
//-------------------------------------------------------------------------
//   Copyright 2002-2021 National Technology & Engineering Solutions of
//   Sandia, LLC (NTESS).  Under the terms of Contract DE-NA0003525 with
//   NTESS, the U.S. Government retains certain rights in this software.
//
//   This file is part of the Xyce(TM) Parallel Electrical Simulator.
//
//   Xyce(TM) is free software: you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation, either version 3 of the License, or
//   (at your option) any later version.
//
//   Xyce(TM) is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with Xyce(TM).
//   If not, see <http://www.gnu.org/licenses/>.
//-------------------------------------------------------------------------


//-------------------------------------------------------------------------
//
// Purpose        :
//
// Special Notes  : Generated from verilog file vbic_1p3.va with ADMS
//                  interface for Xyce 7.3.0
//                  DO NOT EDIT THIS FILE DIRECTLY!  It may be overwritten!
//
// Creator        : admsXml-2.3.6
//
// Creation Date  : Sun, 18 Apr 2021 10:09:00
//
//-------------------------------------------------------------------------
// Shut up clang's warnings about extraneous parentheses
#ifdef __clang__
#  pragma clang diagnostic ignored "-Wparentheses-equality"
#endif

#include <Xyce_config.h>
#include <N_DEV_ADMSvbic13_4t.h>


#include <N_DEV_Const.h>
#include <N_DEV_DeviceOptions.h>
#include <N_DEV_DeviceMaster.h>
#include <N_DEV_ExternData.h>
#include <N_DEV_SolverState.h>
#include <N_DEV_Message.h>

#include <N_LAS_Matrix.h>
#include <N_LAS_Vector.h>

  #include <N_ANP_NoiseData.h>

#include <N_UTL_FeatureTest.h>
#include <unordered_map>
using std::unordered_map;

#include <algorithm>

// Xyce_config.h contains a VERSION macro from autoconf, and some
// Verilog-A models like to define a variable of that name.  This can be
// a serious problem, and we don't need the VERSION macro.  Get rid of it.
// This must happen *after* all includes of Xyce headers, each of which
// includes Xyce_config.h!
#ifdef VERSION
#undef VERSION
#endif

namespace Xyce {
namespace Device {
namespace ADMSvbic13_4t {
namespace AnalogFunctions {
// Derivative of Analog Function limRTH
double d_limRTH(double orig , double old  , double d_orig , double d_old )
{
// Function return variable and total deriv
double limRTH;
double d_limRTH;
// Derivatives of return value w.r.t input vars
double d_limRTH_d_orig;
double d_limRTH_d_old;
double t0;
double d_t0_d_orig;
double d_t0_d_old;
double t1;
double d_t1_d_orig;
double d_t1_d_old;
double retval;
double d_retval_d_orig;
double d_retval_d_old;
{
d_t0_d_orig=1.0;
d_t0_d_old=(-1.0);
t0=(orig-old);
d_t1_d_orig=(((t0>=0)?(+1.0):(-1.0)))*d_t0_d_orig;
d_t1_d_old=(((t0>=0)?(+1.0):(-1.0)))*d_t0_d_old;
t1=fabs(t0);
d_retval_d_orig=1.0;
d_retval_d_old=0.0;
retval=orig;
if((t1>5.0))
{
if((t0>0))
{
d_retval_d_orig=0.0;
d_retval_d_old=1.0;
retval=(old+5.0);
}
else
{
d_retval_d_orig=0.0;
d_retval_d_old=1.0;
retval=(old-5.0);
}
}
d_limRTH_d_orig=d_retval_d_orig;
d_limRTH_d_old=d_retval_d_old;
limRTH=retval;
}
d_limRTH = d_limRTH_d_orig*d_orig+d_limRTH_d_old*d_old;
return(d_limRTH);
}

// Evaluator class implementations for Analog Function limRTH
  // Constructor
  limRTHEvaluator::limRTHEvaluator(double orig, double old)
  {
    limRTHReturn_ = evaluator_(orig, old);
  }
  // method to get precomputed values into double vars 
  double limRTHEvaluator::getValues(double  orig, double  old)
  {
    // Silence unused argument warnings
    (void) orig;
    (void) old;
    // Copy all precomputed values into corresponding output
    return(limRTHReturn_.value);
  }
  // method to get total deriv w.r.t some variable via chain rule 
  // given precomputed derivs of function w.r.t. args and derivs of args
  // w.r.t desired vars
  double limRTHEvaluator::getDerivs(double orig , double old  , double d_orig, double d_old)
  {
    // Function total deriv
    double d_limRTH;
    // Silence unused argument warnings
    (void) orig;
    (void) old;
    d_limRTH = limRTHReturn_.deriv_WRT_orig*d_orig+limRTHReturn_.deriv_WRT_old*d_old;
    return(d_limRTH);
  }
  // method that actually performs our computations.
  limRTHEvaluator::returnType limRTHEvaluator::evaluator_(double orig, double old)
  {
  // Function value and derivs variables, and a returnType to store everything
  double limRTH;
  limRTHEvaluator::returnType limRTHReturn;
  // Derivatives of return value w.r.t input vars
  double d_limRTH_d_orig;
  double d_limRTH_d_old;
  // declared local variables
  double t0;
  double d_t0_d_orig;
  double d_t0_d_old;
  double t1;
  double d_t1_d_orig;
  double d_t1_d_old;
  double retval;
  double d_retval_d_orig;
  double d_retval_d_old;
{
d_t0_d_orig=1.0;
d_t0_d_old=(-1.0);
t0=(orig-old);
d_t1_d_orig=(((t0>=0)?(+1.0):(-1.0)))*d_t0_d_orig;
d_t1_d_old=(((t0>=0)?(+1.0):(-1.0)))*d_t0_d_old;
t1=fabs(t0);
d_retval_d_orig=1.0;
d_retval_d_old=0.0;
retval=orig;
if((t1>5.0))
{
if((t0>0))
{
d_retval_d_orig=0.0;
d_retval_d_old=1.0;
retval=(old+5.0);
}
else
{
d_retval_d_orig=0.0;
d_retval_d_old=1.0;
retval=(old-5.0);
}
}
d_limRTH_d_orig=d_retval_d_orig;
d_limRTH_d_old=d_retval_d_old;
limRTH=retval;
}
  // now save outputs and derivs into appropriate return vars
  limRTHReturn.value=limRTH;
  limRTHReturn.deriv_WRT_orig = d_limRTH_d_orig;
  limRTHReturn.deriv_WRT_old = d_limRTH_d_old;
  return(limRTHReturn);
  }

} // namepace AnalogFunctions
JacobianStamp Instance::jacStamp;
IdVector Instance::nodeMap;
PairMap Instance::pairToJacStampMap;


//This is necessary because the IntPair usage can trip undefined references
    const int Instance::admsNodeID_c;
    const int Instance::admsNodeID_b;
    const int Instance::admsNodeID_e;
    const int Instance::admsNodeID_s;
    const int Instance::admsNodeID_dt;
    const int Instance::admsNodeID_cx;
    const int Instance::admsNodeID_ci;
    const int Instance::admsNodeID_bx;
    const int Instance::admsNodeID_bi;
    const int Instance::admsNodeID_ei;
    const int Instance::admsNodeID_bp;
    const int Instance::admsNodeID_si;
    const int Instance::admsNodeID_xf1;
    const int Instance::admsNodeID_xf2;
     const int Instance::admsNodeID_GND;
   // Additional IDs for branch equations


void
Traits::loadInstanceParameters(ParametricData<ADMSvbic13_4t::Instance> &p)
{
  // Set up each parameter directly, using the up-cased variable name
  // as the tag.

  // This kludge is to force us always to have an instance parameter
  // that the device manager can set to the temperature, even if we have
  // no "TEMP".
  p.addPar("XYCEADMSINSTTEMP", 0.0, &ADMSvbic13_4t::Instance::admsInstTemp)
    .setExpressionAccess(NO_DOC)
    .setUnit(U_DEGK)
    .setCategory(CAT_TEMP)
    .setDescription("Internal-use parameter for setting device instance temperature");
  p.addPar("M", static_cast<double>(1.0), &ADMSvbic13_4t::Instance::m)
    .setUnit(U_UNKNOWN)
    .setDescription("multiplicity factor")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&instSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TRISE", static_cast<double>(0.0), &ADMSvbic13_4t::Instance::trise)
    .setUnit(U_DEGC)
    .setDescription("local temperature delta to ambient (before self-heating)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&instSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("DTA", static_cast<double>(0.0), &ADMSvbic13_4t::Instance::trise)
    .setUnit(U_DEGC)
    .setDescription(" Alias for trise")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&instSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("DTEMP", static_cast<double>(0.0), &ADMSvbic13_4t::Instance::trise)
    .setUnit(U_DEGC)
    .setDescription(" Alias for trise")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&instSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("SW_NOISE", static_cast<int>(1), &ADMSvbic13_4t::Instance::sw_noise)
    .setUnit(U_UNKNOWN)
    .setDescription("switch for including noise:   0=no and 1=yes");
  p.addPar("SW_ET", static_cast<int>(1), &ADMSvbic13_4t::Instance::sw_et)
    .setUnit(U_UNKNOWN)
    .setDescription("switch for self-heating:      0=no and 1=yes");


}

void Traits::loadModelParameters(ParametricData<ADMSvbic13_4t::Model> &p)
{
  // Set up each parameter directly, using the up-cased variable name
  // as the tag.

  // This kludge is to force us always to have a model parameter
  // that the device manager can set to the temperature, even if we have
  // no "TEMP".
  p.addPar("XYCEADMSMODTEMP", 0.0, &ADMSvbic13_4t::Model::admsModTemp)
    .setExpressionAccess(NO_DOC)
    .setUnit(U_DEGK)
    .setCategory(CAT_TEMP)
    .setDescription("Internal-use parameter for setting device model temperature");
  p.addPar("NPN", static_cast<double>(0.0), &ADMSvbic13_4t::Model::npn)
    .setUnit(U_UNKNOWN)
    .setDescription("npn transistor type")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("PNP", static_cast<double>(0.0), &ADMSvbic13_4t::Model::pnp)
    .setUnit(U_UNKNOWN)
    .setDescription("pnp transistor type")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TYPE", static_cast<int>((-1)), &ADMSvbic13_4t::Model::type)
    .setUnit(U_UNKNOWN)
    .setDescription("transistor type: -1=npn and +1=pnp (overriden by npn or pnp)");
//Hidden parameter VBICtype
  p.addPar("SCALE", static_cast<double>(1.0), &ADMSvbic13_4t::Model::scale)
    .setUnit(U_UNKNOWN)
    .setDescription("scale  factor for instance geometries")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("SHRINK", static_cast<double>(0.0), &ADMSvbic13_4t::Model::shrink)
    .setUnit(U_UNKNOWN)
    .setDescription("shrink percentage for instance geometries")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TMIN", static_cast<double>((-100.0)), &ADMSvbic13_4t::Model::tmin)
    .setUnit(U_DEGC)
    .setDescription("minimum ambient temperature")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TMAX", static_cast<double>(500.0), &ADMSvbic13_4t::Model::tmax)
    .setUnit(U_DEGC)
    .setDescription("maximum ambient temperature")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("GMIN", static_cast<double>(1.0e-12), &ADMSvbic13_4t::Model::gmin)
    .setUnit(U_OHMM1)
    .setDescription("minimum conductance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("PNJMAXI", static_cast<double>(1.0), &ADMSvbic13_4t::Model::pnjmaxi)
    .setUnit(U_AMP)
    .setDescription("current at which to linearize diode currents")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("MAXEXP", static_cast<double>(1.0e22), &ADMSvbic13_4t::Model::maxexp)
    .setUnit(U_UNKNOWN)
    .setDescription("argument at which to linearize general exponentials")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TNOM", static_cast<double>(27.0), &ADMSvbic13_4t::Model::tnom)
    .setUnit(U_DEGC)
    .setDescription("nominal (reference) temperature")
   .setAutoConvertTemperature(false)
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TMINCLIP", static_cast<double>((-100.0)), &ADMSvbic13_4t::Model::tminclip)
    .setUnit(U_DEGC)
    .setDescription("clip minimum temperature")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TMAXCLIP", static_cast<double>(500.0), &ADMSvbic13_4t::Model::tmaxclip)
    .setUnit(U_DEGC)
    .setDescription("clip maximum temperature")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("RCX", static_cast<double>(0.0), &ADMSvbic13_4t::Model::rcx)
    .setUnit(U_OHM)
    .setDescription("extrinsic collector resistance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("RCI", static_cast<double>(0.0), &ADMSvbic13_4t::Model::rci)
    .setUnit(U_OHM)
    .setDescription("intrinsic collector resistance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("VO", static_cast<double>(0.0), &ADMSvbic13_4t::Model::vo)
    .setUnit(U_VOLT)
    .setDescription("epi drift saturation voltage")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("GAMM", static_cast<double>(0.0), &ADMSvbic13_4t::Model::gamm)
    .setUnit(U_UNKNOWN)
    .setDescription("epi doping parameter")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("HRCF", static_cast<double>(0.0), &ADMSvbic13_4t::Model::hrcf)
    .setUnit(U_UNKNOWN)
    .setDescription("high current collector resistance factor")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("RBX", static_cast<double>(0.0), &ADMSvbic13_4t::Model::rbx)
    .setUnit(U_OHM)
    .setDescription("extrinsic base resistance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("RBI", static_cast<double>(0.0), &ADMSvbic13_4t::Model::rbi)
    .setUnit(U_OHM)
    .setDescription("intrinsic base resistance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("RE", static_cast<double>(0.0), &ADMSvbic13_4t::Model::re)
    .setUnit(U_OHM)
    .setDescription("extrinsic emitter resistance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("RS", static_cast<double>(0.0), &ADMSvbic13_4t::Model::rs)
    .setUnit(U_OHM)
    .setDescription("extrinsic substrate resistance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("RBP", static_cast<double>(0.0), &ADMSvbic13_4t::Model::rbp)
    .setUnit(U_OHM)
    .setDescription("parasitic transistor base resistance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IS", static_cast<double>(1.0e-16), &ADMSvbic13_4t::Model::is)
    .setUnit(U_AMP)
    .setDescription("transport saturation current")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("ISRR", static_cast<double>(1.0), &ADMSvbic13_4t::Model::isrr)
    .setUnit(U_UNKNOWN)
    .setDescription("ratio of is(reverse) to is(forward)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("NF", static_cast<double>(1.0), &ADMSvbic13_4t::Model::nf)
    .setUnit(U_UNKNOWN)
    .setDescription("fwd emission coefficient (ideality factor)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("NR", static_cast<double>(1.0), &ADMSvbic13_4t::Model::nr)
    .setUnit(U_UNKNOWN)
    .setDescription("rev emission coefficient (ideality factor)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("QBM", static_cast<int>(0), &ADMSvbic13_4t::Model::qbm)
    .setUnit(U_UNKNOWN)
    .setDescription("base charge model selection switch: 0=GP and 1=SGP");
  p.addPar("ISP", static_cast<double>(0.0), &ADMSvbic13_4t::Model::isp)
    .setUnit(U_AMP)
    .setDescription("parasitic transport saturation current")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("WSP", static_cast<double>(1.0), &ADMSvbic13_4t::Model::wsp)
    .setUnit(U_UNKNOWN)
    .setDescription("partitioning of Iccp between Vbep and Vbci")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("NFP", static_cast<double>(1.0), &ADMSvbic13_4t::Model::nfp)
    .setUnit(U_UNKNOWN)
    .setDescription("parasitic emission coeff (ideality factor)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("FC", static_cast<double>(0.9), &ADMSvbic13_4t::Model::fc)
    .setUnit(U_UNKNOWN)
    .setDescription("forward bias depletion capacitance limit")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("CBEO", static_cast<double>(0.0), &ADMSvbic13_4t::Model::cbeo)
    .setUnit(U_FARAD)
    .setDescription("extrinsic b-e overlap capacitance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("CJE", static_cast<double>(0.0), &ADMSvbic13_4t::Model::cje)
    .setUnit(U_FARAD)
    .setDescription("zero-bias b-e depletion capacitance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("PE", static_cast<double>(0.75), &ADMSvbic13_4t::Model::pe)
    .setUnit(U_VOLT)
    .setDescription("b-e built-in potential")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("ME", static_cast<double>(0.33), &ADMSvbic13_4t::Model::me)
    .setUnit(U_UNKNOWN)
    .setDescription("b-e grading coefficient")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("AJE", static_cast<double>((-0.5)), &ADMSvbic13_4t::Model::aje)
    .setUnit(U_UNKNOWN)
    .setDescription("b-e capacitance smoothing factor")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("CBCO", static_cast<double>(0.0), &ADMSvbic13_4t::Model::cbco)
    .setUnit(U_FARAD)
    .setDescription("extrinsic b-c overlap capacitance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("CJC", static_cast<double>(0.0), &ADMSvbic13_4t::Model::cjc)
    .setUnit(U_FARAD)
    .setDescription("zero-bias b-c depletion capacitance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("PC", static_cast<double>(0.75), &ADMSvbic13_4t::Model::pc)
    .setUnit(U_VOLT)
    .setDescription("b-c built-in potential")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("MC", static_cast<double>(0.33), &ADMSvbic13_4t::Model::mc)
    .setUnit(U_UNKNOWN)
    .setDescription("b-c grading coefficient")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("AJC", static_cast<double>((-0.5)), &ADMSvbic13_4t::Model::ajc)
    .setUnit(U_UNKNOWN)
    .setDescription("b-c capacitance smoothing factor")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("VRT", static_cast<double>(0.0), &ADMSvbic13_4t::Model::vrt)
    .setUnit(U_VOLT)
    .setDescription("reach-through voltage for Cbc limiting")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("ART", static_cast<double>(0.1), &ADMSvbic13_4t::Model::art)
    .setUnit(U_UNKNOWN)
    .setDescription("smoothing parameter for reach-through")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("QCO", static_cast<double>(0.0), &ADMSvbic13_4t::Model::qco)
    .setUnit(U_COULOMB)
    .setDescription("epi charge parameter")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("CJEP", static_cast<double>(0.0), &ADMSvbic13_4t::Model::cjep)
    .setUnit(U_FARAD)
    .setDescription("zero-bias extrinsic b-c depletion capacitance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("CJCP", static_cast<double>(0.0), &ADMSvbic13_4t::Model::cjcp)
    .setUnit(U_FARAD)
    .setDescription("zero-bias extrinsic c-s depletion capacitance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("PS", static_cast<double>(0.75), &ADMSvbic13_4t::Model::ps)
    .setUnit(U_VOLT)
    .setDescription("c-s built-in potential")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("MS", static_cast<double>(0.33), &ADMSvbic13_4t::Model::ms)
    .setUnit(U_UNKNOWN)
    .setDescription("c-s grading coefficient")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("AJS", static_cast<double>((-0.5)), &ADMSvbic13_4t::Model::ajs)
    .setUnit(U_UNKNOWN)
    .setDescription("c-s capacitance smoothing factor")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("CCSO", static_cast<double>(0.0), &ADMSvbic13_4t::Model::ccso)
    .setUnit(U_FARAD)
    .setDescription("extrinsic c-s overlap capacitance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IBEI", static_cast<double>(1.0e-18), &ADMSvbic13_4t::Model::ibei)
    .setUnit(U_AMP)
    .setDescription("ideal b-e saturation current")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("WBE", static_cast<double>(1.0), &ADMSvbic13_4t::Model::wbe)
    .setUnit(U_UNKNOWN)
    .setDescription("partitioning of Ibe/Ibex and Qbe/Qbex")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("NEI", static_cast<double>(1.0), &ADMSvbic13_4t::Model::nei)
    .setUnit(U_UNKNOWN)
    .setDescription("ideal b-e emission coefficient")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("QNIBEIR", static_cast<double>(0.0), &ADMSvbic13_4t::Model::qnibeir)
    .setUnit(U_UNKNOWN)
    .setDescription("ideal b-e quasi-neutral base recombination parameter")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IBEN", static_cast<double>(0.0), &ADMSvbic13_4t::Model::iben)
    .setUnit(U_AMP)
    .setDescription("non-ideal b-e saturation current")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("NEN", static_cast<double>(2.0), &ADMSvbic13_4t::Model::nen)
    .setUnit(U_UNKNOWN)
    .setDescription("non-ideal b-e emission coefficient")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IBCI", static_cast<double>(1.0e-16), &ADMSvbic13_4t::Model::ibci)
    .setUnit(U_AMP)
    .setDescription("ideal b-c saturation current")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("NCI", static_cast<double>(1.0), &ADMSvbic13_4t::Model::nci)
    .setUnit(U_UNKNOWN)
    .setDescription("ideal b-c emission coefficient")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IBCN", static_cast<double>(0.0), &ADMSvbic13_4t::Model::ibcn)
    .setUnit(U_AMP)
    .setDescription("non-ideal b-c saturation current")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("NCN", static_cast<double>(2.0), &ADMSvbic13_4t::Model::ncn)
    .setUnit(U_UNKNOWN)
    .setDescription("non-ideal b-c emission coefficient")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IBEIP", static_cast<double>(0.0), &ADMSvbic13_4t::Model::ibeip)
    .setUnit(U_AMP)
    .setDescription("ideal parasitic b-e saturation current")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IBENP", static_cast<double>(0.0), &ADMSvbic13_4t::Model::ibenp)
    .setUnit(U_AMP)
    .setDescription("non-ideal parasitic b-e saturation current")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IBCIP", static_cast<double>(0.0), &ADMSvbic13_4t::Model::ibcip)
    .setUnit(U_AMP)
    .setDescription("ideal parasitic b-c saturation current")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("NCIP", static_cast<double>(1.0), &ADMSvbic13_4t::Model::ncip)
    .setUnit(U_UNKNOWN)
    .setDescription("ideal parasitic b-c emission coefficient")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IBCNP", static_cast<double>(0.0), &ADMSvbic13_4t::Model::ibcnp)
    .setUnit(U_AMP)
    .setDescription("non-ideal parasitic b-c saturation current")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("NCNP", static_cast<double>(2.0), &ADMSvbic13_4t::Model::ncnp)
    .setUnit(U_UNKNOWN)
    .setDescription("non-ideal parasitic b-c emission coefficient")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("VEF", static_cast<double>(0.0), &ADMSvbic13_4t::Model::vef)
    .setUnit(U_VOLT)
    .setDescription("forward Early voltage (zero=infinite)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("VER", static_cast<double>(0.0), &ADMSvbic13_4t::Model::ver)
    .setUnit(U_VOLT)
    .setDescription("reverse Early voltage (zero=infinite)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IKF", static_cast<double>(0.0), &ADMSvbic13_4t::Model::ikf)
    .setUnit(U_AMP)
    .setDescription("forward knee current  (zero=infinite)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("NKF", static_cast<double>(0.5), &ADMSvbic13_4t::Model::nkf)
    .setUnit(U_UNKNOWN)
    .setDescription("high current beta roll-off parameter")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IKR", static_cast<double>(0.0), &ADMSvbic13_4t::Model::ikr)
    .setUnit(U_AMP)
    .setDescription("reverse knee current  (zero=infinite)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IKP", static_cast<double>(0.0), &ADMSvbic13_4t::Model::ikp)
    .setUnit(U_AMP)
    .setDescription("parasitic knee current  (zero=infinite)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TF", static_cast<double>(0.0), &ADMSvbic13_4t::Model::tf)
    .setUnit(U_SECOND)
    .setDescription("forward transit time")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("QTF", static_cast<double>(0.0), &ADMSvbic13_4t::Model::qtf)
    .setUnit(U_UNKNOWN)
    .setDescription("variation of tf with base-width modulation")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XTF", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xtf)
    .setUnit(U_UNKNOWN)
    .setDescription("tf bias dependence coefficient")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("VTF", static_cast<double>(0.0), &ADMSvbic13_4t::Model::vtf)
    .setUnit(U_VOLT)
    .setDescription("tf coefficient of Vbci dependence")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("ITF", static_cast<double>(0.0), &ADMSvbic13_4t::Model::itf)
    .setUnit(U_AMP)
    .setDescription("tf coefficient of Ic dependence")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TR", static_cast<double>(0.0), &ADMSvbic13_4t::Model::tr)
    .setUnit(U_SECOND)
    .setDescription("reverse transit time")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TD", static_cast<double>(0.0), &ADMSvbic13_4t::Model::td)
    .setUnit(U_SECOND)
    .setDescription("forward excess-phase delay time")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("AVC1", static_cast<double>(0.0), &ADMSvbic13_4t::Model::avc1)
    .setUnit(U_VOLTM1)
    .setDescription("b-c   weak avalanche parameter 1")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("AVC2", static_cast<double>(0.0), &ADMSvbic13_4t::Model::avc2)
    .setUnit(U_UNKNOWN)
    .setDescription("b-c   weak avalanche parameter 2")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("AVCX1", static_cast<double>(0.0), &ADMSvbic13_4t::Model::avcx1)
    .setUnit(U_VOLTM1)
    .setDescription("bx-cx weak avalanche parameter 1")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("AVCX2", static_cast<double>(0.0), &ADMSvbic13_4t::Model::avcx2)
    .setUnit(U_UNKNOWN)
    .setDescription("bx-cx weak avalanche parameter 2")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("MCX", static_cast<double>(0.33), &ADMSvbic13_4t::Model::mcx)
    .setUnit(U_UNKNOWN)
    .setDescription("bx-cx grading coefficient for avalanche")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("VBBE", static_cast<double>(0.0), &ADMSvbic13_4t::Model::vbbe)
    .setUnit(U_VOLT)
    .setDescription("b-e   breakdown voltage")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("NBBE", static_cast<double>(1.0), &ADMSvbic13_4t::Model::nbbe)
    .setUnit(U_UNKNOWN)
    .setDescription("b-e   breakdown emission coefficient")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IBBE", static_cast<double>(1.0e-06), &ADMSvbic13_4t::Model::ibbe)
    .setUnit(U_AMP)
    .setDescription("b-e   breakdown current")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TVBBE1", static_cast<double>(0.0), &ADMSvbic13_4t::Model::tvbbe1)
    .setUnit(U_DEGCM1)
    .setDescription("linear temperature coefficient of vbbe")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TVBBE2", static_cast<double>(0.0), &ADMSvbic13_4t::Model::tvbbe2)
    .setUnit(U_UNKNOWN)
    .setDescription("quadratic temperature coefficient of vbbe")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TNBBE", static_cast<double>(0.0), &ADMSvbic13_4t::Model::tnbbe)
    .setUnit(U_DEGCM1)
    .setDescription("temperature coefficient of nbbe")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("VPTE", static_cast<double>(0.0), &ADMSvbic13_4t::Model::vpte)
    .setUnit(U_VOLT)
    .setDescription("SiGe base current kink voltage")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("IBK0", static_cast<double>(0.0), &ADMSvbic13_4t::Model::ibk0)
    .setUnit(U_AMP)
    .setDescription("SiGe base current kink current reference")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("ABK", static_cast<double>(1.0), &ADMSvbic13_4t::Model::abk)
    .setUnit(U_UNKNOWN)
    .setDescription("SiGe base current kink exponent")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("BBK", static_cast<double>(0.0), &ADMSvbic13_4t::Model::bbk)
    .setUnit(U_AMP)
    .setDescription("SiGe base current kink current factor")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("KFN", static_cast<double>(0.0), &ADMSvbic13_4t::Model::kfn)
    .setUnit(U_UNKNOWN)
    .setDescription("b-e flicker noise constant")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("AFN", static_cast<double>(1.0), &ADMSvbic13_4t::Model::afn)
    .setUnit(U_UNKNOWN)
    .setDescription("b-e flicker noise current exponent")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("BFN", static_cast<double>(1.0), &ADMSvbic13_4t::Model::bfn)
    .setUnit(U_UNKNOWN)
    .setDescription("b-e flicker noise 1/f exponent")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("RTH", static_cast<double>(0.0), &ADMSvbic13_4t::Model::rth)
    .setUnit(U_UNKNOWN)
    .setDescription("thermal resistance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("CTH", static_cast<double>(0.0), &ADMSvbic13_4t::Model::cth)
    .setUnit(U_UNKNOWN)
    .setDescription("thermal capacitance")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XRE", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xre)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of re")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XRB", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xrb)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of rbx and rbi")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XRBI", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xrbi)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of rbi (overrides xrb)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XRBX", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xrbx)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of rbx (overrides xrb)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XRC", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xrc)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of rci and rcx and rbp")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XRCI", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xrci)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of rci (overrides xrc)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XRCX", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xrcx)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of rcx (overrides xrc)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XRBP", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xrbp)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of rbp (overrides xrc)")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XRS", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xrs)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of rs")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XVO", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xvo)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of vo")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("EA", static_cast<double>(1.12), &ADMSvbic13_4t::Model::ea)
    .setUnit(U_VOLT)
    .setDescription("activation energy for is")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("EAIE", static_cast<double>(1.12), &ADMSvbic13_4t::Model::eaie)
    .setUnit(U_VOLT)
    .setDescription("activation energy for ibei")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("EAIC", static_cast<double>(1.12), &ADMSvbic13_4t::Model::eaic)
    .setUnit(U_VOLT)
    .setDescription("activation energy for ibci and ibeip")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("EAIS", static_cast<double>(1.12), &ADMSvbic13_4t::Model::eais)
    .setUnit(U_VOLT)
    .setDescription("activation energy for ibcip")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("EANE", static_cast<double>(1.12), &ADMSvbic13_4t::Model::eane)
    .setUnit(U_VOLT)
    .setDescription("activation energy for iben")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("EANC", static_cast<double>(1.12), &ADMSvbic13_4t::Model::eanc)
    .setUnit(U_VOLT)
    .setDescription("activation energy for ibcn and ibenp")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("EANS", static_cast<double>(1.12), &ADMSvbic13_4t::Model::eans)
    .setUnit(U_VOLT)
    .setDescription("activation energy for ibcnp")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("EAP", static_cast<double>(1.12), &ADMSvbic13_4t::Model::eap)
    .setUnit(U_VOLT)
    .setDescription("activation energy for isp")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("DEAR", static_cast<double>(0.0), &ADMSvbic13_4t::Model::dear)
    .setUnit(U_VOLT)
    .setDescription("delta activation energy for isrr")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XIS", static_cast<double>(3.0), &ADMSvbic13_4t::Model::xis)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of is")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XII", static_cast<double>(3.0), &ADMSvbic13_4t::Model::xii)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of ibei, ibci, ibeip, ibcip")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XIN", static_cast<double>(3.0), &ADMSvbic13_4t::Model::xin)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of iben, ibcn, ibenp, ibcnp")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XISR", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xisr)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent for isrr")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("XIKF", static_cast<double>(0.0), &ADMSvbic13_4t::Model::xikf)
    .setUnit(U_UNKNOWN)
    .setDescription("temperature exponent of ikf")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TAVC", static_cast<double>(0.0), &ADMSvbic13_4t::Model::tavc)
    .setUnit(U_DEGCM1)
    .setDescription("temperature exponent of avc2")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TAVCX", static_cast<double>(0.0), &ADMSvbic13_4t::Model::tavcx)
    .setUnit(U_DEGCM1)
    .setDescription("temperature exponent of avcx2")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TNF", static_cast<double>(0.0), &ADMSvbic13_4t::Model::tnf)
    .setUnit(U_DEGCM1)
    .setDescription("temperature exponent of nf and nr")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TCVEF", static_cast<double>(0.0), &ADMSvbic13_4t::Model::tcvef)
    .setUnit(U_DEGCM1)
    .setDescription("temperature exponent of vef")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TCVER", static_cast<double>(0.0), &ADMSvbic13_4t::Model::tcver)
    .setUnit(U_DEGCM1)
    .setDescription("temperature exponent of ver")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;
  p.addPar("TCRTH", static_cast<double>(0.0), &ADMSvbic13_4t::Model::tcrth)
    .setUnit(U_DEGCM1)
    .setDescription("temperature exponent of rth")
#ifdef Xyce_ADMS_SENSITIVITIES
    .setAnalyticSensitivityAvailable(true)
    .setSensitivityFunctor(&modSens)
#endif // Xyce_ADMS_SENSITIVITIES
;

}

//-----------------------------------------------------------------------------
// Function      : Instance::processParams
// Purpose       :
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
bool Instance::processParams()
{
  // set any non-constant parameter defaults

  // copy any model variables that have associated instance variables, but
  // are only given in the model card:



  // Set any parameters that were not given and whose defaults depend on other
  // parameters:


// Now we need to check that any parameters are within their ranges as
  // specified in the verilog:

//    Parameter m : ] 0.0,  (+inf) [
  if ( (!((m >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter m value " << m << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter sw_noise : [ 0, 1 ]
  if ( (!((sw_noise >=0 && sw_noise <=1 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter sw_noise value " << sw_noise << " out of range [ 0, 1 ]";
  }

//    Parameter sw_et : [ 0, 1 ]
  if ( (!((sw_et >=0 && sw_et <=1 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter sw_et value " << sw_et << " out of range [ 0, 1 ]";
  }


  // this seems a little stupid, but verilog models that use $temperature
  // don't also use a defined parameter "Temp", and count on $temperature
  // to be the one the simulator wants:

  updateTemperature(admsInstTemp);

  // and of course, this routine is where we should put the initial_instance
  // stuff
//Begin block initial_instance
{
mMod = m;

d_tdevC_dTemp_dt_GND =  0.0;
tdevC = ((admsTemperature+trise)-273.15);
if ((tdevC<(model_.tmin)))
{
UserInfo(*this)  << "WARNING: ambient temperature is lower than allowed minimum" << " " <<  std::endl; 
}
if ((tdevC>(model_.tmax)))
{
UserInfo(*this)  << "WARNING: ambient temperature is higher than allowed maximum" << " " <<  std::endl; 
}
if ((tdevC<((model_.tminclip)+1.0)))
{
{
double value_exp_0 = exp(((tdevC-(model_.tminclip))-1.0));

d_tdevC_dTemp_dt_GND =  0.0;
tdevC = ((model_.tminclip)+value_exp_0);
}
}
else
{
if ((tdevC>((model_.tmaxclip)-1.0)))
{
{
double value_exp_0 = exp((((model_.tmaxclip)-tdevC)-1.0));

d_tdevC_dTemp_dt_GND =  0.0;
tdevC = ((model_.tmaxclip)-value_exp_0);
}
}
else
{

d_tdevC_dTemp_dt_GND =  0.0;
}
}

d_tdevK_dTemp_dt_GND =  0.0;
tdevK = (tdevC+273.15);

d_vtv_dTemp_dt_GND =  0.0;
vtv = ((1.380662e-23*tdevK)/1.602189e-19);

d_rT_dTemp_dt_GND =  0.0;
rT = (tdevK/(model_.tiniK));
{
double value_log_0 = log((adms_vt(admsTemperature)/(1.41421356237309504880*(model_.is))));
tVCrit = (adms_vt(admsTemperature)*value_log_0);
}
if (((model_.ibbe)>0.0))
{
{
double value_exp_0 = exp(((-(model_.vbbe))/((model_.nbbe)*vtv)));
double value_log_1 = log((value_exp_0+((model_.imaxMod)/(model_.ibbe))));
maxvIbbe = (((model_.nbbe)*vtv)*value_log_1);
}
}
else
{
maxvIbbe = 0.0;
}
{
double value_pow_0 = pow(rT,((model_.xis)/(model_.nf)));
double value_exp_1 = exp((((-(model_.ea))*(1.0-rT))/(vtv*(model_.nf))));

d_is_t_dTemp_dt_GND =  0.0;
is_t = (((model_.is)*value_pow_0)*value_exp_1);
}
if ((is_t>0.0))
{
if ((((model_.ikf)>0.0)&&((model_.imaxMod)>(model_.ikf))))
{
{
double value_pow_0 = pow((4.0/(model_.ikf)),(model_.nkf));
double value_pow_1 = pow(((0.5*(model_.imaxMod))*value_pow_0),(1.0/(1.0-(model_.nkf))));
double value_log_2 = log((1.0+(value_pow_1/is_t)));
maxvIfi = (((model_.nf)*vtv)*value_log_2);
}
}
else
{
{
double value_log_0 = log((1.0+((model_.imaxMod)/is_t)));
maxvIfi = (((model_.nf)*vtv)*value_log_0);
}
}
}
else
{
maxvIfi = 0.0;
}
{
double value_pow_0 = pow(rT,((model_.xisr)/(model_.nr)));
double value_exp_1 = exp((((-(model_.dear))*(1.0-rT))/(vtv*(model_.nr))));

d_isrr_t_dTemp_dt_GND =  0.0;
isrr_t = (((model_.isrr)*value_pow_0)*value_exp_1);
}
if (((is_t>0.0)&&(isrr_t>0.0)))
{
if ((((model_.ikr)>0.0)&&((model_.imaxMod)>(model_.ikr))))
{
{
double value_pow_0 = pow((4.0/(model_.ikr)),(model_.nkf));
double value_pow_1 = pow(((0.5*(model_.imaxMod))*value_pow_0),(1.0/(1.0-(model_.nkf))));
double value_log_2 = log((1.0+(value_pow_1/(is_t*isrr_t))));
maxvIri = (((model_.nr)*vtv)*value_log_2);
}
}
else
{
{
double value_log_0 = log((1.0+((model_.imaxMod)/(is_t*isrr_t))));
maxvIri = (((model_.nr)*vtv)*value_log_0);
}
}
}
else
{
maxvIri = 0.0;
}
{
double value_pow_0 = pow(rT,((model_.xis)/(model_.nfp)));
double value_exp_1 = exp((((-(model_.eap))*(1.0-rT))/(vtv*(model_.nfp))));

d_isp_t_dTemp_dt_GND =  0.0;
isp_t = (((model_.isp)*value_pow_0)*value_exp_1);
}
if ((isp_t>0.0))
{
if ((((model_.ikp)>0.0)&&((model_.imaxMod)>(model_.ikp))))
{
{
double value_log_0 = log((1.0+((((model_.imaxMod)*(model_.imaxMod))*(model_.Iikp))/isp_t)));
maxvIp = (((model_.nfp)*vtv)*value_log_0);
}
}
else
{
{
double value_log_0 = log((1.0+((model_.imaxMod)/isp_t)));
maxvIp = (((model_.nfp)*vtv)*value_log_0);
}
}
}
else
{
maxvIp = 0.0;
}
{
double value_pow_0 = pow(rT,((model_.xii)/(model_.nei)));
double value_exp_1 = exp((((-(model_.eaie))*(1.0-rT))/(vtv*(model_.nei))));

d_ibei_t_dTemp_dt_GND =  0.0;
ibei_t = (((model_.ibei)*value_pow_0)*value_exp_1);
}
if ((ibei_t>0.0))
{
{
double value_log_0 = log((1.0+((model_.imaxMod)/ibei_t)));
maxvIbei = (((model_.nei)*vtv)*value_log_0);
}
}
else
{
maxvIbei = 0.0;
}
{
double value_pow_0 = pow(rT,((model_.xin)/(model_.nen)));
double value_exp_1 = exp((((-(model_.eane))*(1.0-rT))/(vtv*(model_.nen))));

d_iben_t_dTemp_dt_GND =  0.0;
iben_t = (((model_.iben)*value_pow_0)*value_exp_1);
}
if ((iben_t>0.0))
{
{
double value_log_0 = log((1.0+((model_.imaxMod)/iben_t)));
maxvIben = (((model_.nen)*vtv)*value_log_0);
}
}
else
{
maxvIben = 0.0;
}
{
double value_pow_0 = pow(rT,((model_.xii)/(model_.nci)));
double value_exp_1 = exp((((-(model_.eaic))*(1.0-rT))/(vtv*(model_.nci))));

d_ibci_t_dTemp_dt_GND =  0.0;
ibci_t = (((model_.ibci)*value_pow_0)*value_exp_1);
}
if ((ibci_t>0.0))
{
{
double value_log_0 = log((1.0+((model_.imaxMod)/ibci_t)));
maxvIbci = (((model_.nci)*vtv)*value_log_0);
}
}
else
{
maxvIbci = 0.0;
}
{
double value_pow_0 = pow(rT,((model_.xin)/(model_.ncn)));
double value_exp_1 = exp((((-(model_.eanc))*(1.0-rT))/(vtv*(model_.ncn))));

d_ibcn_t_dTemp_dt_GND =  0.0;
ibcn_t = (((model_.ibcn)*value_pow_0)*value_exp_1);
}
if ((ibcn_t>0.0))
{
{
double value_log_0 = log((1.0+((model_.imaxMod)/ibcn_t)));
maxvIbcn = (((model_.ncn)*vtv)*value_log_0);
}
}
else
{
maxvIbcn = 0.0;
}
{
double value_pow_0 = pow(rT,((model_.xii)/(model_.nci)));
double value_exp_1 = exp((((-(model_.eaic))*(1.0-rT))/(vtv*(model_.nci))));

d_ibeip_t_dTemp_dt_GND =  0.0;
ibeip_t = (((model_.ibeip)*value_pow_0)*value_exp_1);
}
if ((ibeip_t>0.0))
{
{
double value_log_0 = log((1.0+((model_.imaxMod)/ibeip_t)));
maxvIbeip = (((model_.nci)*vtv)*value_log_0);
}
}
else
{
maxvIbeip = 0.0;
}
{
double value_pow_0 = pow(rT,((model_.xin)/(model_.ncn)));
double value_exp_1 = exp((((-(model_.eanc))*(1.0-rT))/(vtv*(model_.ncn))));

d_ibenp_t_dTemp_dt_GND =  0.0;
ibenp_t = (((model_.ibenp)*value_pow_0)*value_exp_1);
}
if ((ibenp_t>0.0))
{
{
double value_log_0 = log((1.0+((model_.imaxMod)/ibenp_t)));
maxvIbenp = (((model_.ncn)*vtv)*value_log_0);
}
}
else
{
maxvIbenp = 0.0;
}
{
double value_pow_0 = pow(rT,((model_.xii)/(model_.ncip)));
double value_exp_1 = exp((((-(model_.eais))*(1.0-rT))/(vtv*(model_.ncip))));

d_ibcip_t_dTemp_dt_GND =  0.0;
ibcip_t = (((model_.ibcip)*value_pow_0)*value_exp_1);
}
if ((ibcip_t>0.0))
{
{
double value_log_0 = log((1.0+((model_.imaxMod)/ibcip_t)));
maxvIbcip = (((model_.ncip)*vtv)*value_log_0);
}
}
else
{
maxvIbcip = 0.0;
}
{
double value_pow_0 = pow(rT,((model_.xin)/(model_.ncnp)));
double value_exp_1 = exp((((-(model_.eans))*(1.0-rT))/(vtv*(model_.ncnp))));

d_ibcnp_t_dTemp_dt_GND =  0.0;
ibcnp_t = (((model_.ibcnp)*value_pow_0)*value_exp_1);
}
if ((ibcnp_t>0.0))
{
{
double value_log_0 = log((1.0+((model_.imaxMod)/ibcnp_t)));
maxvIbcnp = (((model_.ncnp)*vtv)*value_log_0);
}
}
else
{
maxvIbcnp = 0.0;
}
}
// End block initial_instance


  return true;
}

//-----------------------------------------------------------------------------
// Function      : Instance::Instance
// Purpose       : "instance block" constructor
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------

Instance::Instance(
  const Configuration & configuration,
  const InstanceBlock & instance_block,
  Model &               model,
  const FactoryBlock &  factory_block)
  : DeviceInstance(instance_block, configuration.getInstanceParameters(), factory_block),
    model_(model),
    m(1.0),
    trise(0.0),
    sw_noise(1),
    sw_et(1),
    is_t(0.0),
d_is_t_dTemp_dt_GND(0.0),
    isrr_t(0.0),
d_isrr_t_dTemp_dt_GND(0.0),
    ibei_t(0.0),
d_ibei_t_dTemp_dt_GND(0.0),
    ibci_t(0.0),
d_ibci_t_dTemp_dt_GND(0.0),
    isp_t(0.0),
d_isp_t_dTemp_dt_GND(0.0),
    iben_t(0.0),
d_iben_t_dTemp_dt_GND(0.0),
    ibcn_t(0.0),
d_ibcn_t_dTemp_dt_GND(0.0),
    ibeip_t(0.0),
d_ibeip_t_dTemp_dt_GND(0.0),
    ibenp_t(0.0),
d_ibenp_t_dTemp_dt_GND(0.0),
    ibcip_t(0.0),
d_ibcip_t_dTemp_dt_GND(0.0),
    ibcnp_t(0.0),
d_ibcnp_t_dTemp_dt_GND(0.0),
    tdevC(0.0),
d_tdevC_dTemp_dt_GND(0.0),
    tdevK(0.0),
d_tdevK_dTemp_dt_GND(0.0),
    rT(0.0),
d_rT_dTemp_dt_GND(0.0),
    Gcx(0.0),
d_Gcx_dTemp_dt_GND(0.0),
    Gci(0.0),
d_Gci_dTemp_dt_GND(0.0),
    Gbx(0.0),
d_Gbx_dTemp_dt_GND(0.0),
    Gbi(0.0),
d_Gbi_dTemp_dt_GND(0.0),
    Ge(0.0),
d_Ge_dTemp_dt_GND(0.0),
    Gbp(0.0),
d_Gbp_dTemp_dt_GND(0.0),
    Gs(0.0),
d_Gs_dTemp_dt_GND(0.0),
    maxvIfi(0.0),
    maxvIri(0.0),
    maxvIp(0.0),
    maxvIbbe(0.0),
    maxvIbei(0.0),
    maxvIben(0.0),
    maxvIbci(0.0),
    maxvIbcn(0.0),
    maxvIbeip(0.0),
    maxvIbenp(0.0),
    maxvIbcip(0.0),
    maxvIbcnp(0.0),
    vtv(0.0),
d_vtv_dTemp_dt_GND(0.0),
    Itzf(0.0),
d_Itzf_dTemp_dt_GND(0.0),
d_Itzf_dV_bi_ei(0.0),
d_Itzf_dV_bi_ci(0.0),
    qb(0.0),
d_qb_dV_bi_ei(0.0),
d_qb_dTemp_dt_GND(0.0),
d_qb_dV_bi_ci(0.0),
    Iccp(0.0),
d_Iccp_dTemp_dt_GND(0.0),
d_Iccp_dV_bx_bp(0.0),
d_Iccp_dV_bi_ci(0.0),
d_Iccp_dV_bi_ei(0.0),
d_Iccp_dV_si_bp(0.0),
    qbp(0.0),
d_qbp_dV_bx_bp(0.0),
d_qbp_dV_bi_ei(0.0),
d_qbp_dTemp_dt_GND(0.0),
d_qbp_dV_bi_ci(0.0),
    Ibe(0.0),
d_Ibe_dV_bx_ei(0.0),
d_Ibe_dTemp_dt_GND(0.0),
d_Ibe_dV_bi_ei(0.0),
d_Ibe_dV_bi_ci(0.0),
d_Ibe_dV_si_bp(0.0),
d_Ibe_dV_bx_bp(0.0),
    Ibex(0.0),
d_Ibex_dTemp_dt_GND(0.0),
d_Ibex_dV_bx_ei(0.0),
d_Ibex_dV_si_bp(0.0),
d_Ibex_dV_bx_bp(0.0),
d_Ibex_dV_bi_ci(0.0),
d_Ibex_dV_bi_ei(0.0),
    Ibep(0.0),
d_Ibep_dTemp_dt_GND(0.0),
d_Ibep_dV_bx_ei(0.0),
d_Ibep_dV_si_bp(0.0),
d_Ibep_dV_bx_bp(0.0),
d_Ibep_dV_bi_ci(0.0),
d_Ibep_dV_bi_ei(0.0),
    Irci(0.0),
d_Irci_dV_cx_ci(0.0),
d_Irci_dTemp_dt_GND(0.0),
d_Irci_dV_bx_ei(0.0),
d_Irci_dV_si_bp(0.0),
d_Irci_dV_bx_bp(0.0),
d_Irci_dV_bi_ci(0.0),
d_Irci_dV_bi_ei(0.0),
d_Irci_dV_bi_cx(0.0),
    Vrci(0.0),
d_Vrci_dV_cx_ci(0.0),
    mMod(0.0),
    tVCrit(0.0),
    li_c(-1),
    li_b(-1),
    li_e(-1),
    li_s(-1),
    li_dt(-1),
    li_cx(-1),
    li_ci(-1),
    li_bx(-1),
    li_bi(-1),
    li_ei(-1),
    li_bp(-1),
    li_si(-1),
    li_xf1(-1),
    li_xf2(-1),
    li_branch_ic(-1),
    li_branch_ib(-1),
    li_branch_ie(-1),
    li_branch_is(-1),
    f_bi_Equ_bx_Node_Ptr(0),
    f_bi_Equ_bp_Node_Ptr(0),
    f_ei_Equ_bx_Node_Ptr(0),
    f_ei_Equ_bp_Node_Ptr(0),
    f_bi_Equ_si_Node_Ptr(0),
    f_ei_Equ_si_Node_Ptr(0),
    f_bi_Equ_bi_Node_Ptr(0),
    f_bi_Equ_ci_Node_Ptr(0),
    f_ei_Equ_bi_Node_Ptr(0),
    f_ei_Equ_ci_Node_Ptr(0),
    f_bi_Equ_ei_Node_Ptr(0),
    f_ei_Equ_ei_Node_Ptr(0),
    f_bi_Equ_dt_Node_Ptr(0),
    f_ei_Equ_dt_Node_Ptr(0),
    f_bx_Equ_bi_Node_Ptr(0),
    f_bx_Equ_ei_Node_Ptr(0),
    f_bx_Equ_ci_Node_Ptr(0),
    f_bx_Equ_bx_Node_Ptr(0),
    f_bx_Equ_bp_Node_Ptr(0),
    f_bx_Equ_si_Node_Ptr(0),
    f_bx_Equ_dt_Node_Ptr(0),
    f_ci_Equ_xf2_Node_Ptr(0),
    f_ei_Equ_xf2_Node_Ptr(0),
    f_ci_Equ_bi_Node_Ptr(0),
    f_ci_Equ_ei_Node_Ptr(0),
    f_ci_Equ_ci_Node_Ptr(0),
    f_ci_Equ_dt_Node_Ptr(0),
    f_bi_Equ_xf2_Node_Ptr(0),
    f_ci_Equ_bx_Node_Ptr(0),
    f_ci_Equ_bp_Node_Ptr(0),
    f_ci_Equ_si_Node_Ptr(0),
    f_cx_Equ_bi_Node_Ptr(0),
    f_cx_Equ_ci_Node_Ptr(0),
    f_bx_Equ_cx_Node_Ptr(0),
    f_cx_Equ_bx_Node_Ptr(0),
    f_cx_Equ_cx_Node_Ptr(0),
    f_cx_Equ_dt_Node_Ptr(0),
    f_bx_Equ_c_Node_Ptr(0),
    f_cx_Equ_c_Node_Ptr(0),
    f_bp_Equ_bi_Node_Ptr(0),
    f_bp_Equ_ei_Node_Ptr(0),
    f_bp_Equ_ci_Node_Ptr(0),
    f_bp_Equ_bx_Node_Ptr(0),
    f_bp_Equ_bp_Node_Ptr(0),
    f_bp_Equ_si_Node_Ptr(0),
    f_bp_Equ_dt_Node_Ptr(0),
    f_c_Equ_dt_Node_Ptr(0),
    f_c_Equ_c_Node_Ptr(0),
    f_c_Equ_cx_Node_Ptr(0),
    f_ci_Equ_cx_Node_Ptr(0),
    f_cx_Equ_ei_Node_Ptr(0),
    f_cx_Equ_bp_Node_Ptr(0),
    f_cx_Equ_si_Node_Ptr(0),
    f_b_Equ_dt_Node_Ptr(0),
    f_b_Equ_b_Node_Ptr(0),
    f_b_Equ_bx_Node_Ptr(0),
    f_bx_Equ_b_Node_Ptr(0),
    f_e_Equ_dt_Node_Ptr(0),
    f_e_Equ_e_Node_Ptr(0),
    f_e_Equ_ei_Node_Ptr(0),
    f_ei_Equ_e_Node_Ptr(0),
    f_bp_Equ_cx_Node_Ptr(0),
    f_si_Equ_bi_Node_Ptr(0),
    f_si_Equ_ei_Node_Ptr(0),
    f_si_Equ_ci_Node_Ptr(0),
    f_si_Equ_bx_Node_Ptr(0),
    f_si_Equ_bp_Node_Ptr(0),
    f_si_Equ_si_Node_Ptr(0),
    f_si_Equ_dt_Node_Ptr(0),
    f_s_Equ_dt_Node_Ptr(0),
    f_s_Equ_s_Node_Ptr(0),
    f_s_Equ_si_Node_Ptr(0),
    f_si_Equ_s_Node_Ptr(0),
    f_xf1_Equ_bi_Node_Ptr(0),
    f_xf1_Equ_ci_Node_Ptr(0),
    f_xf1_Equ_ei_Node_Ptr(0),
    f_xf1_Equ_dt_Node_Ptr(0),
    f_xf1_Equ_xf2_Node_Ptr(0),
    f_xf2_Equ_xf1_Node_Ptr(0),
    f_xf2_Equ_xf2_Node_Ptr(0),
    f_dt_Equ_dt_Node_Ptr(0),
    f_dt_Equ_bp_Node_Ptr(0),
    f_dt_Equ_cx_Node_Ptr(0),
    f_dt_Equ_e_Node_Ptr(0),
    f_dt_Equ_ei_Node_Ptr(0),
    f_dt_Equ_bx_Node_Ptr(0),
    f_dt_Equ_bi_Node_Ptr(0),
    f_dt_Equ_b_Node_Ptr(0),
    f_dt_Equ_ci_Node_Ptr(0),
    f_dt_Equ_c_Node_Ptr(0),
    f_dt_Equ_si_Node_Ptr(0),
    f_dt_Equ_s_Node_Ptr(0),
    f_dt_Equ_xf2_Node_Ptr(0),
    f_bi_Equ_cx_Node_Ptr(0),
    f_ei_Equ_cx_Node_Ptr(0),
    f_b_Equ_e_Node_Ptr(0),
    f_e_Equ_b_Node_Ptr(0),
    f_b_Equ_c_Node_Ptr(0),
    f_c_Equ_b_Node_Ptr(0),
    f_xf1_Equ_xf1_Node_Ptr(0),
    q_bi_Equ_bx_Node_Ptr(0),
    q_bi_Equ_bp_Node_Ptr(0),
    q_ei_Equ_bx_Node_Ptr(0),
    q_ei_Equ_bp_Node_Ptr(0),
    q_bi_Equ_si_Node_Ptr(0),
    q_ei_Equ_si_Node_Ptr(0),
    q_bi_Equ_bi_Node_Ptr(0),
    q_bi_Equ_ci_Node_Ptr(0),
    q_ei_Equ_bi_Node_Ptr(0),
    q_ei_Equ_ci_Node_Ptr(0),
    q_bi_Equ_ei_Node_Ptr(0),
    q_ei_Equ_ei_Node_Ptr(0),
    q_bi_Equ_dt_Node_Ptr(0),
    q_ei_Equ_dt_Node_Ptr(0),
    q_bx_Equ_bi_Node_Ptr(0),
    q_bx_Equ_ei_Node_Ptr(0),
    q_bx_Equ_ci_Node_Ptr(0),
    q_bx_Equ_bx_Node_Ptr(0),
    q_bx_Equ_bp_Node_Ptr(0),
    q_bx_Equ_si_Node_Ptr(0),
    q_bx_Equ_dt_Node_Ptr(0),
    q_ci_Equ_xf2_Node_Ptr(0),
    q_ei_Equ_xf2_Node_Ptr(0),
    q_ci_Equ_bi_Node_Ptr(0),
    q_ci_Equ_ei_Node_Ptr(0),
    q_ci_Equ_ci_Node_Ptr(0),
    q_ci_Equ_dt_Node_Ptr(0),
    q_bi_Equ_xf2_Node_Ptr(0),
    q_ci_Equ_bx_Node_Ptr(0),
    q_ci_Equ_bp_Node_Ptr(0),
    q_ci_Equ_si_Node_Ptr(0),
    q_cx_Equ_bi_Node_Ptr(0),
    q_cx_Equ_ci_Node_Ptr(0),
    q_bx_Equ_cx_Node_Ptr(0),
    q_cx_Equ_bx_Node_Ptr(0),
    q_cx_Equ_cx_Node_Ptr(0),
    q_cx_Equ_dt_Node_Ptr(0),
    q_bx_Equ_c_Node_Ptr(0),
    q_cx_Equ_c_Node_Ptr(0),
    q_bp_Equ_bi_Node_Ptr(0),
    q_bp_Equ_ei_Node_Ptr(0),
    q_bp_Equ_ci_Node_Ptr(0),
    q_bp_Equ_bx_Node_Ptr(0),
    q_bp_Equ_bp_Node_Ptr(0),
    q_bp_Equ_si_Node_Ptr(0),
    q_bp_Equ_dt_Node_Ptr(0),
    q_c_Equ_dt_Node_Ptr(0),
    q_c_Equ_c_Node_Ptr(0),
    q_c_Equ_cx_Node_Ptr(0),
    q_ci_Equ_cx_Node_Ptr(0),
    q_cx_Equ_ei_Node_Ptr(0),
    q_cx_Equ_bp_Node_Ptr(0),
    q_cx_Equ_si_Node_Ptr(0),
    q_b_Equ_dt_Node_Ptr(0),
    q_b_Equ_b_Node_Ptr(0),
    q_b_Equ_bx_Node_Ptr(0),
    q_bx_Equ_b_Node_Ptr(0),
    q_e_Equ_dt_Node_Ptr(0),
    q_e_Equ_e_Node_Ptr(0),
    q_e_Equ_ei_Node_Ptr(0),
    q_ei_Equ_e_Node_Ptr(0),
    q_bp_Equ_cx_Node_Ptr(0),
    q_si_Equ_bi_Node_Ptr(0),
    q_si_Equ_ei_Node_Ptr(0),
    q_si_Equ_ci_Node_Ptr(0),
    q_si_Equ_bx_Node_Ptr(0),
    q_si_Equ_bp_Node_Ptr(0),
    q_si_Equ_si_Node_Ptr(0),
    q_si_Equ_dt_Node_Ptr(0),
    q_s_Equ_dt_Node_Ptr(0),
    q_s_Equ_s_Node_Ptr(0),
    q_s_Equ_si_Node_Ptr(0),
    q_si_Equ_s_Node_Ptr(0),
    q_xf1_Equ_bi_Node_Ptr(0),
    q_xf1_Equ_ci_Node_Ptr(0),
    q_xf1_Equ_ei_Node_Ptr(0),
    q_xf1_Equ_dt_Node_Ptr(0),
    q_xf1_Equ_xf2_Node_Ptr(0),
    q_xf2_Equ_xf1_Node_Ptr(0),
    q_xf2_Equ_xf2_Node_Ptr(0),
    q_dt_Equ_dt_Node_Ptr(0),
    q_dt_Equ_bp_Node_Ptr(0),
    q_dt_Equ_cx_Node_Ptr(0),
    q_dt_Equ_e_Node_Ptr(0),
    q_dt_Equ_ei_Node_Ptr(0),
    q_dt_Equ_bx_Node_Ptr(0),
    q_dt_Equ_bi_Node_Ptr(0),
    q_dt_Equ_b_Node_Ptr(0),
    q_dt_Equ_ci_Node_Ptr(0),
    q_dt_Equ_c_Node_Ptr(0),
    q_dt_Equ_si_Node_Ptr(0),
    q_dt_Equ_s_Node_Ptr(0),
    q_dt_Equ_xf2_Node_Ptr(0),
    q_bi_Equ_cx_Node_Ptr(0),
    q_ei_Equ_cx_Node_Ptr(0),
    q_b_Equ_e_Node_Ptr(0),
    q_e_Equ_b_Node_Ptr(0),
    q_b_Equ_c_Node_Ptr(0),
    q_c_Equ_b_Node_Ptr(0),
    q_xf1_Equ_xf1_Node_Ptr(0),
    A_bi_Equ_bx_NodeOffset(-1),
    A_bi_Equ_bp_NodeOffset(-1),
    A_ei_Equ_bx_NodeOffset(-1),
    A_ei_Equ_bp_NodeOffset(-1),
    A_bi_Equ_si_NodeOffset(-1),
    A_ei_Equ_si_NodeOffset(-1),
    A_bi_Equ_bi_NodeOffset(-1),
    A_bi_Equ_ci_NodeOffset(-1),
    A_ei_Equ_bi_NodeOffset(-1),
    A_ei_Equ_ci_NodeOffset(-1),
    A_bi_Equ_ei_NodeOffset(-1),
    A_ei_Equ_ei_NodeOffset(-1),
    A_bi_Equ_dt_NodeOffset(-1),
    A_ei_Equ_dt_NodeOffset(-1),
    A_bx_Equ_bi_NodeOffset(-1),
    A_bx_Equ_ei_NodeOffset(-1),
    A_bx_Equ_ci_NodeOffset(-1),
    A_bx_Equ_bx_NodeOffset(-1),
    A_bx_Equ_bp_NodeOffset(-1),
    A_bx_Equ_si_NodeOffset(-1),
    A_bx_Equ_dt_NodeOffset(-1),
    A_ci_Equ_xf2_NodeOffset(-1),
    A_ei_Equ_xf2_NodeOffset(-1),
    A_ci_Equ_bi_NodeOffset(-1),
    A_ci_Equ_ei_NodeOffset(-1),
    A_ci_Equ_ci_NodeOffset(-1),
    A_ci_Equ_dt_NodeOffset(-1),
    A_bi_Equ_xf2_NodeOffset(-1),
    A_ci_Equ_bx_NodeOffset(-1),
    A_ci_Equ_bp_NodeOffset(-1),
    A_ci_Equ_si_NodeOffset(-1),
    A_cx_Equ_bi_NodeOffset(-1),
    A_cx_Equ_ci_NodeOffset(-1),
    A_bx_Equ_cx_NodeOffset(-1),
    A_cx_Equ_bx_NodeOffset(-1),
    A_cx_Equ_cx_NodeOffset(-1),
    A_cx_Equ_dt_NodeOffset(-1),
    A_bx_Equ_c_NodeOffset(-1),
    A_cx_Equ_c_NodeOffset(-1),
    A_bp_Equ_bi_NodeOffset(-1),
    A_bp_Equ_ei_NodeOffset(-1),
    A_bp_Equ_ci_NodeOffset(-1),
    A_bp_Equ_bx_NodeOffset(-1),
    A_bp_Equ_bp_NodeOffset(-1),
    A_bp_Equ_si_NodeOffset(-1),
    A_bp_Equ_dt_NodeOffset(-1),
    A_c_Equ_dt_NodeOffset(-1),
    A_c_Equ_c_NodeOffset(-1),
    A_c_Equ_cx_NodeOffset(-1),
    A_ci_Equ_cx_NodeOffset(-1),
    A_cx_Equ_ei_NodeOffset(-1),
    A_cx_Equ_bp_NodeOffset(-1),
    A_cx_Equ_si_NodeOffset(-1),
    A_b_Equ_dt_NodeOffset(-1),
    A_b_Equ_b_NodeOffset(-1),
    A_b_Equ_bx_NodeOffset(-1),
    A_bx_Equ_b_NodeOffset(-1),
    A_e_Equ_dt_NodeOffset(-1),
    A_e_Equ_e_NodeOffset(-1),
    A_e_Equ_ei_NodeOffset(-1),
    A_ei_Equ_e_NodeOffset(-1),
    A_bp_Equ_cx_NodeOffset(-1),
    A_si_Equ_bi_NodeOffset(-1),
    A_si_Equ_ei_NodeOffset(-1),
    A_si_Equ_ci_NodeOffset(-1),
    A_si_Equ_bx_NodeOffset(-1),
    A_si_Equ_bp_NodeOffset(-1),
    A_si_Equ_si_NodeOffset(-1),
    A_si_Equ_dt_NodeOffset(-1),
    A_s_Equ_dt_NodeOffset(-1),
    A_s_Equ_s_NodeOffset(-1),
    A_s_Equ_si_NodeOffset(-1),
    A_si_Equ_s_NodeOffset(-1),
    A_xf1_Equ_bi_NodeOffset(-1),
    A_xf1_Equ_ci_NodeOffset(-1),
    A_xf1_Equ_ei_NodeOffset(-1),
    A_xf1_Equ_dt_NodeOffset(-1),
    A_xf1_Equ_xf2_NodeOffset(-1),
    A_xf2_Equ_xf1_NodeOffset(-1),
    A_xf2_Equ_xf2_NodeOffset(-1),
    A_dt_Equ_dt_NodeOffset(-1),
    A_dt_Equ_bp_NodeOffset(-1),
    A_dt_Equ_cx_NodeOffset(-1),
    A_dt_Equ_e_NodeOffset(-1),
    A_dt_Equ_ei_NodeOffset(-1),
    A_dt_Equ_bx_NodeOffset(-1),
    A_dt_Equ_bi_NodeOffset(-1),
    A_dt_Equ_b_NodeOffset(-1),
    A_dt_Equ_ci_NodeOffset(-1),
    A_dt_Equ_c_NodeOffset(-1),
    A_dt_Equ_si_NodeOffset(-1),
    A_dt_Equ_s_NodeOffset(-1),
    A_dt_Equ_xf2_NodeOffset(-1),
    A_bi_Equ_cx_NodeOffset(-1),
    A_ei_Equ_cx_NodeOffset(-1),
    A_b_Equ_e_NodeOffset(-1),
    A_e_Equ_b_NodeOffset(-1),
    A_b_Equ_c_NodeOffset(-1),
    A_c_Equ_b_NodeOffset(-1),
    A_xf1_Equ_xf1_NodeOffset(-1),
    li_store_admsProbeID_Temp_dt_GND(-1),
    li_store_admsProbeID_V_bi_ei(-1),
    li_store_admsProbeID_V_bx_ei(-1),
    li_store_admsProbeID_V_bi_ci(-1),
    li_store_admsProbeID_V_bi_cx(-1),
    li_store_admsProbeID_V_bx_cx(-1),
    li_store_admsProbeID_V_bx_bp(-1),
    li_store_admsProbeID_V_b_e(-1),
    admsTemperature(getDeviceOptions().temp.getImmutableValue<double>()),
    dtExternalNodeMode(false),
    cxExternalNodeMode(false),
    ciExternalNodeMode(false),
    bxExternalNodeMode(false),
    biExternalNodeMode(false),
    eiExternalNodeMode(false)

{
    numIntVars = 10 + 0;
    numExtVars = 4;

  // Right now, we only have store for limited probes and output vars...
  setNumStoreVars(8+0);

  // Manually inserted code:  detect extra nodes given on instance line,
  // set external node mode for those normally-internal nodes.
  devConMap.resize(numExtVars);
  for (int j=0; j< numExtVars; j++)
    devConMap[j] = 1;

  if (instance_block.numExtVars > numExtVars)
  {
    devConMap.resize(instance_block.numExtVars);
    if (instance_block.numExtVars >= numExtVars+1)
    {
      dtExternalNodeMode=true;
      --numIntVars;
      devConMap[numExtVars] = 2;       
    }
    if (instance_block.numExtVars >= numExtVars+2)
    {
      cxExternalNodeMode=true;
      --numIntVars;
      devConMap[numExtVars+1] = 1;       
    }
    if (instance_block.numExtVars >= numExtVars+3)
    {
      ciExternalNodeMode=true;
      --numIntVars;
      devConMap[numExtVars+2] = 1;       
    }
    if (instance_block.numExtVars >= numExtVars+4)
    {
      bxExternalNodeMode=true;
      --numIntVars;
      devConMap[numExtVars+3] = 1;       
    }
    if (instance_block.numExtVars >= numExtVars+5)
    {
      biExternalNodeMode=true;
      --numIntVars;
      devConMap[numExtVars+4] = 1;       
    }
    if (instance_block.numExtVars >= numExtVars+6)
    {
      eiExternalNodeMode=true;
      --numIntVars;
      devConMap[numExtVars+5] = 1;       
    }
    numExtVars=instance_block.numExtVars;
  }
  // End manually inserted code
  
  // Do not allocate "branch" (lead current) vectors by default
  setNumBranchDataVars(0);
  numBranchDataVarsIfAllocated = 4;

  leadCurrentF.resize(4);
  leadCurrentQ.resize(4);

  // Set up jacobian stamp:
  // Create a vector of the non-zero elements of the stamp
PairVector jacobianElements;
    jacobianElements.push_back(IntPair(admsNodeID_c,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_c,admsNodeID_c));
    jacobianElements.push_back(IntPair(admsNodeID_c,admsNodeID_cx));
    jacobianElements.push_back(IntPair(admsNodeID_c,admsNodeID_b));
    jacobianElements.push_back(IntPair(admsNodeID_b,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_b,admsNodeID_b));
    jacobianElements.push_back(IntPair(admsNodeID_b,admsNodeID_bx));
    jacobianElements.push_back(IntPair(admsNodeID_b,admsNodeID_e));
    jacobianElements.push_back(IntPair(admsNodeID_b,admsNodeID_c));
    jacobianElements.push_back(IntPair(admsNodeID_e,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_e,admsNodeID_e));
    jacobianElements.push_back(IntPair(admsNodeID_e,admsNodeID_ei));
    jacobianElements.push_back(IntPair(admsNodeID_e,admsNodeID_b));
    jacobianElements.push_back(IntPair(admsNodeID_s,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_s,admsNodeID_s));
    jacobianElements.push_back(IntPair(admsNodeID_s,admsNodeID_si));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_bp));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_cx));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_e));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_ei));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_bx));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_bi));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_b));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_ci));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_c));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_si));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_s));
    jacobianElements.push_back(IntPair(admsNodeID_dt,admsNodeID_xf2));
    jacobianElements.push_back(IntPair(admsNodeID_cx,admsNodeID_bi));
    jacobianElements.push_back(IntPair(admsNodeID_cx,admsNodeID_ci));
    jacobianElements.push_back(IntPair(admsNodeID_cx,admsNodeID_bx));
    jacobianElements.push_back(IntPair(admsNodeID_cx,admsNodeID_cx));
    jacobianElements.push_back(IntPair(admsNodeID_cx,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_cx,admsNodeID_c));
    jacobianElements.push_back(IntPair(admsNodeID_cx,admsNodeID_ei));
    jacobianElements.push_back(IntPair(admsNodeID_cx,admsNodeID_bp));
    jacobianElements.push_back(IntPair(admsNodeID_cx,admsNodeID_si));
    jacobianElements.push_back(IntPair(admsNodeID_ci,admsNodeID_xf2));
    jacobianElements.push_back(IntPair(admsNodeID_ci,admsNodeID_bi));
    jacobianElements.push_back(IntPair(admsNodeID_ci,admsNodeID_ei));
    jacobianElements.push_back(IntPair(admsNodeID_ci,admsNodeID_ci));
    jacobianElements.push_back(IntPair(admsNodeID_ci,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_ci,admsNodeID_bx));
    jacobianElements.push_back(IntPair(admsNodeID_ci,admsNodeID_bp));
    jacobianElements.push_back(IntPair(admsNodeID_ci,admsNodeID_si));
    jacobianElements.push_back(IntPair(admsNodeID_ci,admsNodeID_cx));
    jacobianElements.push_back(IntPair(admsNodeID_bx,admsNodeID_bi));
    jacobianElements.push_back(IntPair(admsNodeID_bx,admsNodeID_ei));
    jacobianElements.push_back(IntPair(admsNodeID_bx,admsNodeID_ci));
    jacobianElements.push_back(IntPair(admsNodeID_bx,admsNodeID_bx));
    jacobianElements.push_back(IntPair(admsNodeID_bx,admsNodeID_bp));
    jacobianElements.push_back(IntPair(admsNodeID_bx,admsNodeID_si));
    jacobianElements.push_back(IntPair(admsNodeID_bx,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_bx,admsNodeID_cx));
    jacobianElements.push_back(IntPair(admsNodeID_bx,admsNodeID_c));
    jacobianElements.push_back(IntPair(admsNodeID_bx,admsNodeID_b));
    jacobianElements.push_back(IntPair(admsNodeID_bi,admsNodeID_bx));
    jacobianElements.push_back(IntPair(admsNodeID_bi,admsNodeID_bp));
    jacobianElements.push_back(IntPair(admsNodeID_bi,admsNodeID_si));
    jacobianElements.push_back(IntPair(admsNodeID_bi,admsNodeID_bi));
    jacobianElements.push_back(IntPair(admsNodeID_bi,admsNodeID_ci));
    jacobianElements.push_back(IntPair(admsNodeID_bi,admsNodeID_ei));
    jacobianElements.push_back(IntPair(admsNodeID_bi,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_bi,admsNodeID_xf2));
    jacobianElements.push_back(IntPair(admsNodeID_bi,admsNodeID_cx));
    jacobianElements.push_back(IntPair(admsNodeID_ei,admsNodeID_bx));
    jacobianElements.push_back(IntPair(admsNodeID_ei,admsNodeID_bp));
    jacobianElements.push_back(IntPair(admsNodeID_ei,admsNodeID_si));
    jacobianElements.push_back(IntPair(admsNodeID_ei,admsNodeID_bi));
    jacobianElements.push_back(IntPair(admsNodeID_ei,admsNodeID_ci));
    jacobianElements.push_back(IntPair(admsNodeID_ei,admsNodeID_ei));
    jacobianElements.push_back(IntPair(admsNodeID_ei,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_ei,admsNodeID_xf2));
    jacobianElements.push_back(IntPair(admsNodeID_ei,admsNodeID_e));
    jacobianElements.push_back(IntPair(admsNodeID_ei,admsNodeID_cx));
    jacobianElements.push_back(IntPair(admsNodeID_bp,admsNodeID_bi));
    jacobianElements.push_back(IntPair(admsNodeID_bp,admsNodeID_ei));
    jacobianElements.push_back(IntPair(admsNodeID_bp,admsNodeID_ci));
    jacobianElements.push_back(IntPair(admsNodeID_bp,admsNodeID_bx));
    jacobianElements.push_back(IntPair(admsNodeID_bp,admsNodeID_bp));
    jacobianElements.push_back(IntPair(admsNodeID_bp,admsNodeID_si));
    jacobianElements.push_back(IntPair(admsNodeID_bp,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_bp,admsNodeID_cx));
    jacobianElements.push_back(IntPair(admsNodeID_si,admsNodeID_bi));
    jacobianElements.push_back(IntPair(admsNodeID_si,admsNodeID_ei));
    jacobianElements.push_back(IntPair(admsNodeID_si,admsNodeID_ci));
    jacobianElements.push_back(IntPair(admsNodeID_si,admsNodeID_bx));
    jacobianElements.push_back(IntPair(admsNodeID_si,admsNodeID_bp));
    jacobianElements.push_back(IntPair(admsNodeID_si,admsNodeID_si));
    jacobianElements.push_back(IntPair(admsNodeID_si,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_si,admsNodeID_s));
    jacobianElements.push_back(IntPair(admsNodeID_xf1,admsNodeID_bi));
    jacobianElements.push_back(IntPair(admsNodeID_xf1,admsNodeID_ci));
    jacobianElements.push_back(IntPair(admsNodeID_xf1,admsNodeID_ei));
    jacobianElements.push_back(IntPair(admsNodeID_xf1,admsNodeID_dt));
    jacobianElements.push_back(IntPair(admsNodeID_xf1,admsNodeID_xf2));
    jacobianElements.push_back(IntPair(admsNodeID_xf1,admsNodeID_xf1));
    jacobianElements.push_back(IntPair(admsNodeID_xf2,admsNodeID_xf1));
    jacobianElements.push_back(IntPair(admsNodeID_xf2,admsNodeID_xf2));



  setDefaultParams();
  setParams(instance_block.params);

  // Real bogosity here...
  if (!given("XYCEADMSINSTTEMP"))
    admsInstTemp=getDeviceOptions().temp.getImmutableValue<double>();

  //calculate any parameters specified as expressions
  updateDependentParameters();

  // calculate dependent (i.e. computed params) and check for errors.
  processParams();

  PairVector collapsedNodes;

// Now generate the jacstamp from what we already have.
// This jacstamp will have all the correct node mapping.  map will be the nodal mapping of original
// node IDs to row/column ids in the reduced (non-sparse) representation of the jacobian.
// (for devices that have no collapsibles, this will be static, so check that it hasn't already
// been filled in)
if (jacStamp.empty())
{
int originalSize = 14+0;
computeJacStampAndMaps(jacobianElements,collapsedNodes,jacStamp,nodeMap,pairToJacStampMap,originalSize);
}

}

//-----------------------------------------------------------------------------
// Function      : Instance::~Instance
// Purpose       : destructor
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
Instance::~Instance()
{
}

//-----------------------------------------------------------------------------
// Function      : Instance::registerLIDs
// Purpose       : function for registering, and setting up, local IDs.
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
void Instance::registerLIDs( const LocalIdVector & intLIDVecRef,
                             const LocalIdVector & extLIDVecRef)
{
  AssertLIDs(intLIDVecRef.size() == numIntVars);
  AssertLIDs(extLIDVecRef.size() == numExtVars);

  LocalIdVector localLIDVec;

  if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
  {
    Xyce::dout() << std::endl << section_divider << std::endl
                 << "In ADMSvbic13_4t::Instance::register LIDs\n\n"
                 << "name             = " << getName() << std::endl
                 << "number of internal variables: " << numIntVars << std::endl
                 << "number of external variables: " << numExtVars << std::endl;
  }

  // copy over the global ID lists into a local array.
  // The end result of this is an array of LIDs corresponding to all the
  // nodes we actually have, in the order that topology thinks of them
  intLIDVec = intLIDVecRef;
  extLIDVec = extLIDVecRef;
  localLIDVec.resize(numExtVars+numIntVars);
  for (int localNodeIndex=0;localNodeIndex<numExtVars;++localNodeIndex)
  {
    localLIDVec[localNodeIndex]=extLIDVec[localNodeIndex];
  }
  for (int localNodeIndex=numExtVars;localNodeIndex<numExtVars+numIntVars;++localNodeIndex)
  {
    localLIDVec[localNodeIndex]=intLIDVec[localNodeIndex-numExtVars];
    }

  // Now pull the LIDs for each of our nodes out of the local array.
  // Use the node mapping created by createJacStampAndMaps to handle
  // all the node collapse complications.
  li_c = localLIDVec[nodeMap[admsNodeID_c]];
  li_b = localLIDVec[nodeMap[admsNodeID_b]];
  li_e = localLIDVec[nodeMap[admsNodeID_e]];
  li_s = localLIDVec[nodeMap[admsNodeID_s]];
  li_dt = localLIDVec[nodeMap[admsNodeID_dt]];
  li_cx = localLIDVec[nodeMap[admsNodeID_cx]];
  li_ci = localLIDVec[nodeMap[admsNodeID_ci]];
  li_bx = localLIDVec[nodeMap[admsNodeID_bx]];
  li_bi = localLIDVec[nodeMap[admsNodeID_bi]];
  li_ei = localLIDVec[nodeMap[admsNodeID_ei]];
  li_bp = localLIDVec[nodeMap[admsNodeID_bp]];
  li_si = localLIDVec[nodeMap[admsNodeID_si]];
  li_xf1 = localLIDVec[nodeMap[admsNodeID_xf1]];
  li_xf2 = localLIDVec[nodeMap[admsNodeID_xf2]];


  if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
  {
    Xyce::dout() << "\nSolution and RHS variables:\n";
      Xyce::dout() << "\nli_c = " << li_c << std::endl;
      Xyce::dout() << "\nli_b = " << li_b << std::endl;
      Xyce::dout() << "\nli_e = " << li_e << std::endl;
      Xyce::dout() << "\nli_s = " << li_s << std::endl;
      Xyce::dout() << "\nli_dt = " << li_dt << std::endl;
      Xyce::dout() << "\nli_cx = " << li_cx << std::endl;
      Xyce::dout() << "\nli_ci = " << li_ci << std::endl;
      Xyce::dout() << "\nli_bx = " << li_bx << std::endl;
      Xyce::dout() << "\nli_bi = " << li_bi << std::endl;
      Xyce::dout() << "\nli_ei = " << li_ei << std::endl;
      Xyce::dout() << "\nli_bp = " << li_bp << std::endl;
      Xyce::dout() << "\nli_si = " << li_si << std::endl;
      Xyce::dout() << "\nli_xf1 = " << li_xf1 << std::endl;
      Xyce::dout() << "\nli_xf2 = " << li_xf2 << std::endl;

    Xyce::dout() << "\nEnd of ADMSvbic13_4t::Instance::register LIDs\n";
    Xyce::dout() << section_divider << std::endl;
  }
}

//-----------------------------------------------------------------------------
// Function      : Instance::loadNodeSymbols
// Purpose       :
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
void Instance::loadNodeSymbols(Util::SymbolTable &symbol_table) const
{
  if (!dtExternalNodeMode)
    addInternalNode(symbol_table, li_dt, getName(), "dt");
  if (!cxExternalNodeMode)
    addInternalNode(symbol_table, li_cx, getName(), "cx");
  if (!ciExternalNodeMode)
    addInternalNode(symbol_table, li_ci, getName(), "ci");
  if (!bxExternalNodeMode)
    addInternalNode(symbol_table, li_bx, getName(), "bx");
  if (!biExternalNodeMode)
    addInternalNode(symbol_table, li_bi, getName(), "bi");
  if (!eiExternalNodeMode)
    addInternalNode(symbol_table, li_ei, getName(), "ei");
    addInternalNode(symbol_table, li_bp, getName(), "bp");
    addInternalNode(symbol_table, li_si, getName(), "si");
    addInternalNode(symbol_table, li_xf1, getName(), "xf1");
    addInternalNode(symbol_table, li_xf2, getName(), "xf2");

  if (loadLeadCurrent)
  {
    addBranchDataNode( symbol_table, li_branch_ic, getName(), "BRANCH_DC");
    addBranchDataNode( symbol_table, li_branch_ib, getName(), "BRANCH_DB");
    addBranchDataNode( symbol_table, li_branch_ie, getName(), "BRANCH_DE");
    addBranchDataNode( symbol_table, li_branch_is, getName(), "BRANCH_D4");


  }
}

//-----------------------------------------------------------------------------
// Function      : Instance::registerStoreLIDs
// Purpose       :
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
void Instance::registerStoreLIDs( const LocalIdVector & stoLIDVecRef)
{
  AssertLIDs(stoLIDVecRef.size() == getNumStoreVars());

  int numSto = stoLIDVecRef.size();
  if (numSto > 0)
  {
    int i=0;
    stoLIDVec = stoLIDVecRef;

    li_store_admsProbeID_Temp_dt_GND = stoLIDVec[i++];
    li_store_admsProbeID_V_bi_ei = stoLIDVec[i++];
    li_store_admsProbeID_V_bx_ei = stoLIDVec[i++];
    li_store_admsProbeID_V_bi_ci = stoLIDVec[i++];
    li_store_admsProbeID_V_bi_cx = stoLIDVec[i++];
    li_store_admsProbeID_V_bx_cx = stoLIDVec[i++];
    li_store_admsProbeID_V_bx_bp = stoLIDVec[i++];
    li_store_admsProbeID_V_b_e = stoLIDVec[i++];
  }
}

//-----------------------------------------------------------------------------
// Function      : Instance::registerBranchDataLIDs
// Purpose       :
// Special Notes :
// Scope         : public
// Creator       : Eric Keiter, SNL
// Creation Date : 12/09/11
//-----------------------------------------------------------------------------
void Instance::registerBranchDataLIDs(const std::vector<int> & branchLIDVecRef)
{
  AssertLIDs(branchLIDVecRef.size() == getNumBranchDataVars());

  if (loadLeadCurrent)
  {
    int i = 0;
    li_branch_ic = branchLIDVecRef[i++];
    li_branch_ib = branchLIDVecRef[i++];
    li_branch_ie = branchLIDVecRef[i++];
    li_branch_is = branchLIDVecRef[i++];

  }
}

//-----------------------------------------------------------------------------
// Function      : Instance::jacobianStamp
// Purpose       :
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
const JacobianStamp & Instance::jacobianStamp() const
{
    return jacStamp;
}

//-----------------------------------------------------------------------------
// Function      : Instance::registerJacLIDs
// Purpose       : Create Offset variables used for referencing jacobian
//                 elements
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
void Instance::registerJacLIDs( const JacobianStamp & jacLIDVec)
{
  DeviceInstance::registerJacLIDs(jacLIDVec);  IntPair jacLoc;
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_c,admsNodeID_dt)];
    A_c_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_c,admsNodeID_c)];
    A_c_Equ_c_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_c,admsNodeID_cx)];
    A_c_Equ_cx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_c,admsNodeID_b)];
    A_c_Equ_b_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_b,admsNodeID_dt)];
    A_b_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_b,admsNodeID_b)];
    A_b_Equ_b_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_b,admsNodeID_bx)];
    A_b_Equ_bx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_b,admsNodeID_e)];
    A_b_Equ_e_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_b,admsNodeID_c)];
    A_b_Equ_c_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_e,admsNodeID_dt)];
    A_e_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_e,admsNodeID_e)];
    A_e_Equ_e_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_e,admsNodeID_ei)];
    A_e_Equ_ei_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_e,admsNodeID_b)];
    A_e_Equ_b_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_s,admsNodeID_dt)];
    A_s_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_s,admsNodeID_s)];
    A_s_Equ_s_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_s,admsNodeID_si)];
    A_s_Equ_si_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_dt)];
    A_dt_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_bp)];
    A_dt_Equ_bp_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_cx)];
    A_dt_Equ_cx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_e)];
    A_dt_Equ_e_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_ei)];
    A_dt_Equ_ei_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_bx)];
    A_dt_Equ_bx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_bi)];
    A_dt_Equ_bi_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_b)];
    A_dt_Equ_b_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_ci)];
    A_dt_Equ_ci_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_c)];
    A_dt_Equ_c_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_si)];
    A_dt_Equ_si_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_s)];
    A_dt_Equ_s_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_dt,admsNodeID_xf2)];
    A_dt_Equ_xf2_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_cx,admsNodeID_bi)];
    A_cx_Equ_bi_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_cx,admsNodeID_ci)];
    A_cx_Equ_ci_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_cx,admsNodeID_bx)];
    A_cx_Equ_bx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_cx,admsNodeID_cx)];
    A_cx_Equ_cx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_cx,admsNodeID_dt)];
    A_cx_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_cx,admsNodeID_c)];
    A_cx_Equ_c_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_cx,admsNodeID_ei)];
    A_cx_Equ_ei_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_cx,admsNodeID_bp)];
    A_cx_Equ_bp_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_cx,admsNodeID_si)];
    A_cx_Equ_si_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ci,admsNodeID_xf2)];
    A_ci_Equ_xf2_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ci,admsNodeID_bi)];
    A_ci_Equ_bi_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ci,admsNodeID_ei)];
    A_ci_Equ_ei_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ci,admsNodeID_ci)];
    A_ci_Equ_ci_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ci,admsNodeID_dt)];
    A_ci_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ci,admsNodeID_bx)];
    A_ci_Equ_bx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ci,admsNodeID_bp)];
    A_ci_Equ_bp_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ci,admsNodeID_si)];
    A_ci_Equ_si_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ci,admsNodeID_cx)];
    A_ci_Equ_cx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bx,admsNodeID_bi)];
    A_bx_Equ_bi_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bx,admsNodeID_ei)];
    A_bx_Equ_ei_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bx,admsNodeID_ci)];
    A_bx_Equ_ci_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bx,admsNodeID_bx)];
    A_bx_Equ_bx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bx,admsNodeID_bp)];
    A_bx_Equ_bp_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bx,admsNodeID_si)];
    A_bx_Equ_si_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bx,admsNodeID_dt)];
    A_bx_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bx,admsNodeID_cx)];
    A_bx_Equ_cx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bx,admsNodeID_c)];
    A_bx_Equ_c_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bx,admsNodeID_b)];
    A_bx_Equ_b_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bi,admsNodeID_bx)];
    A_bi_Equ_bx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bi,admsNodeID_bp)];
    A_bi_Equ_bp_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bi,admsNodeID_si)];
    A_bi_Equ_si_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bi,admsNodeID_bi)];
    A_bi_Equ_bi_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bi,admsNodeID_ci)];
    A_bi_Equ_ci_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bi,admsNodeID_ei)];
    A_bi_Equ_ei_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bi,admsNodeID_dt)];
    A_bi_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bi,admsNodeID_xf2)];
    A_bi_Equ_xf2_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bi,admsNodeID_cx)];
    A_bi_Equ_cx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ei,admsNodeID_bx)];
    A_ei_Equ_bx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ei,admsNodeID_bp)];
    A_ei_Equ_bp_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ei,admsNodeID_si)];
    A_ei_Equ_si_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ei,admsNodeID_bi)];
    A_ei_Equ_bi_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ei,admsNodeID_ci)];
    A_ei_Equ_ci_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ei,admsNodeID_ei)];
    A_ei_Equ_ei_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ei,admsNodeID_dt)];
    A_ei_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ei,admsNodeID_xf2)];
    A_ei_Equ_xf2_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ei,admsNodeID_e)];
    A_ei_Equ_e_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_ei,admsNodeID_cx)];
    A_ei_Equ_cx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bp,admsNodeID_bi)];
    A_bp_Equ_bi_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bp,admsNodeID_ei)];
    A_bp_Equ_ei_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bp,admsNodeID_ci)];
    A_bp_Equ_ci_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bp,admsNodeID_bx)];
    A_bp_Equ_bx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bp,admsNodeID_bp)];
    A_bp_Equ_bp_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bp,admsNodeID_si)];
    A_bp_Equ_si_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bp,admsNodeID_dt)];
    A_bp_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_bp,admsNodeID_cx)];
    A_bp_Equ_cx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_si,admsNodeID_bi)];
    A_si_Equ_bi_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_si,admsNodeID_ei)];
    A_si_Equ_ei_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_si,admsNodeID_ci)];
    A_si_Equ_ci_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_si,admsNodeID_bx)];
    A_si_Equ_bx_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_si,admsNodeID_bp)];
    A_si_Equ_bp_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_si,admsNodeID_si)];
    A_si_Equ_si_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_si,admsNodeID_dt)];
    A_si_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_si,admsNodeID_s)];
    A_si_Equ_s_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_xf1,admsNodeID_bi)];
    A_xf1_Equ_bi_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_xf1,admsNodeID_ci)];
    A_xf1_Equ_ci_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_xf1,admsNodeID_ei)];
    A_xf1_Equ_ei_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_xf1,admsNodeID_dt)];
    A_xf1_Equ_dt_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_xf1,admsNodeID_xf2)];
    A_xf1_Equ_xf2_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_xf1,admsNodeID_xf1)];
    A_xf1_Equ_xf1_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_xf2,admsNodeID_xf1)];
    A_xf2_Equ_xf1_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];
    jacLoc = pairToJacStampMap[IntPair(admsNodeID_xf2,admsNodeID_xf2)];
    A_xf2_Equ_xf2_NodeOffset = jacLIDVec[jacLoc.first][jacLoc.second];


}

//-----------------------------------------------------------------------------
// Function      : Instance::setupPointers
// Purpose       : Create pointer variables used for referencing jacobian
//                 elements
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
void Instance::setupPointers( )
{

  Linear::Matrix & dFdx = *(extData.dFdxMatrixPtr);
  Linear::Matrix & dQdx = *(extData.dQdxMatrixPtr);
    f_c_Equ_dt_Node_Ptr = &(dFdx[li_c][A_c_Equ_dt_NodeOffset]);
    q_c_Equ_dt_Node_Ptr = &(dQdx[li_c][A_c_Equ_dt_NodeOffset]);
    f_c_Equ_c_Node_Ptr = &(dFdx[li_c][A_c_Equ_c_NodeOffset]);
    q_c_Equ_c_Node_Ptr = &(dQdx[li_c][A_c_Equ_c_NodeOffset]);
    f_c_Equ_cx_Node_Ptr = &(dFdx[li_c][A_c_Equ_cx_NodeOffset]);
    q_c_Equ_cx_Node_Ptr = &(dQdx[li_c][A_c_Equ_cx_NodeOffset]);
    f_c_Equ_b_Node_Ptr = &(dFdx[li_c][A_c_Equ_b_NodeOffset]);
    q_c_Equ_b_Node_Ptr = &(dQdx[li_c][A_c_Equ_b_NodeOffset]);
    f_b_Equ_dt_Node_Ptr = &(dFdx[li_b][A_b_Equ_dt_NodeOffset]);
    q_b_Equ_dt_Node_Ptr = &(dQdx[li_b][A_b_Equ_dt_NodeOffset]);
    f_b_Equ_b_Node_Ptr = &(dFdx[li_b][A_b_Equ_b_NodeOffset]);
    q_b_Equ_b_Node_Ptr = &(dQdx[li_b][A_b_Equ_b_NodeOffset]);
    f_b_Equ_bx_Node_Ptr = &(dFdx[li_b][A_b_Equ_bx_NodeOffset]);
    q_b_Equ_bx_Node_Ptr = &(dQdx[li_b][A_b_Equ_bx_NodeOffset]);
    f_b_Equ_e_Node_Ptr = &(dFdx[li_b][A_b_Equ_e_NodeOffset]);
    q_b_Equ_e_Node_Ptr = &(dQdx[li_b][A_b_Equ_e_NodeOffset]);
    f_b_Equ_c_Node_Ptr = &(dFdx[li_b][A_b_Equ_c_NodeOffset]);
    q_b_Equ_c_Node_Ptr = &(dQdx[li_b][A_b_Equ_c_NodeOffset]);
    f_e_Equ_dt_Node_Ptr = &(dFdx[li_e][A_e_Equ_dt_NodeOffset]);
    q_e_Equ_dt_Node_Ptr = &(dQdx[li_e][A_e_Equ_dt_NodeOffset]);
    f_e_Equ_e_Node_Ptr = &(dFdx[li_e][A_e_Equ_e_NodeOffset]);
    q_e_Equ_e_Node_Ptr = &(dQdx[li_e][A_e_Equ_e_NodeOffset]);
    f_e_Equ_ei_Node_Ptr = &(dFdx[li_e][A_e_Equ_ei_NodeOffset]);
    q_e_Equ_ei_Node_Ptr = &(dQdx[li_e][A_e_Equ_ei_NodeOffset]);
    f_e_Equ_b_Node_Ptr = &(dFdx[li_e][A_e_Equ_b_NodeOffset]);
    q_e_Equ_b_Node_Ptr = &(dQdx[li_e][A_e_Equ_b_NodeOffset]);
    f_s_Equ_dt_Node_Ptr = &(dFdx[li_s][A_s_Equ_dt_NodeOffset]);
    q_s_Equ_dt_Node_Ptr = &(dQdx[li_s][A_s_Equ_dt_NodeOffset]);
    f_s_Equ_s_Node_Ptr = &(dFdx[li_s][A_s_Equ_s_NodeOffset]);
    q_s_Equ_s_Node_Ptr = &(dQdx[li_s][A_s_Equ_s_NodeOffset]);
    f_s_Equ_si_Node_Ptr = &(dFdx[li_s][A_s_Equ_si_NodeOffset]);
    q_s_Equ_si_Node_Ptr = &(dQdx[li_s][A_s_Equ_si_NodeOffset]);
    f_dt_Equ_dt_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_dt_NodeOffset]);
    q_dt_Equ_dt_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_dt_NodeOffset]);
    f_dt_Equ_bp_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_bp_NodeOffset]);
    q_dt_Equ_bp_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_bp_NodeOffset]);
    f_dt_Equ_cx_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_cx_NodeOffset]);
    q_dt_Equ_cx_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_cx_NodeOffset]);
    f_dt_Equ_e_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_e_NodeOffset]);
    q_dt_Equ_e_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_e_NodeOffset]);
    f_dt_Equ_ei_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_ei_NodeOffset]);
    q_dt_Equ_ei_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_ei_NodeOffset]);
    f_dt_Equ_bx_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_bx_NodeOffset]);
    q_dt_Equ_bx_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_bx_NodeOffset]);
    f_dt_Equ_bi_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_bi_NodeOffset]);
    q_dt_Equ_bi_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_bi_NodeOffset]);
    f_dt_Equ_b_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_b_NodeOffset]);
    q_dt_Equ_b_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_b_NodeOffset]);
    f_dt_Equ_ci_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_ci_NodeOffset]);
    q_dt_Equ_ci_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_ci_NodeOffset]);
    f_dt_Equ_c_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_c_NodeOffset]);
    q_dt_Equ_c_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_c_NodeOffset]);
    f_dt_Equ_si_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_si_NodeOffset]);
    q_dt_Equ_si_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_si_NodeOffset]);
    f_dt_Equ_s_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_s_NodeOffset]);
    q_dt_Equ_s_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_s_NodeOffset]);
    f_dt_Equ_xf2_Node_Ptr = &(dFdx[li_dt][A_dt_Equ_xf2_NodeOffset]);
    q_dt_Equ_xf2_Node_Ptr = &(dQdx[li_dt][A_dt_Equ_xf2_NodeOffset]);
    f_cx_Equ_bi_Node_Ptr = &(dFdx[li_cx][A_cx_Equ_bi_NodeOffset]);
    q_cx_Equ_bi_Node_Ptr = &(dQdx[li_cx][A_cx_Equ_bi_NodeOffset]);
    f_cx_Equ_ci_Node_Ptr = &(dFdx[li_cx][A_cx_Equ_ci_NodeOffset]);
    q_cx_Equ_ci_Node_Ptr = &(dQdx[li_cx][A_cx_Equ_ci_NodeOffset]);
    f_cx_Equ_bx_Node_Ptr = &(dFdx[li_cx][A_cx_Equ_bx_NodeOffset]);
    q_cx_Equ_bx_Node_Ptr = &(dQdx[li_cx][A_cx_Equ_bx_NodeOffset]);
    f_cx_Equ_cx_Node_Ptr = &(dFdx[li_cx][A_cx_Equ_cx_NodeOffset]);
    q_cx_Equ_cx_Node_Ptr = &(dQdx[li_cx][A_cx_Equ_cx_NodeOffset]);
    f_cx_Equ_dt_Node_Ptr = &(dFdx[li_cx][A_cx_Equ_dt_NodeOffset]);
    q_cx_Equ_dt_Node_Ptr = &(dQdx[li_cx][A_cx_Equ_dt_NodeOffset]);
    f_cx_Equ_c_Node_Ptr = &(dFdx[li_cx][A_cx_Equ_c_NodeOffset]);
    q_cx_Equ_c_Node_Ptr = &(dQdx[li_cx][A_cx_Equ_c_NodeOffset]);
    f_cx_Equ_ei_Node_Ptr = &(dFdx[li_cx][A_cx_Equ_ei_NodeOffset]);
    q_cx_Equ_ei_Node_Ptr = &(dQdx[li_cx][A_cx_Equ_ei_NodeOffset]);
    f_cx_Equ_bp_Node_Ptr = &(dFdx[li_cx][A_cx_Equ_bp_NodeOffset]);
    q_cx_Equ_bp_Node_Ptr = &(dQdx[li_cx][A_cx_Equ_bp_NodeOffset]);
    f_cx_Equ_si_Node_Ptr = &(dFdx[li_cx][A_cx_Equ_si_NodeOffset]);
    q_cx_Equ_si_Node_Ptr = &(dQdx[li_cx][A_cx_Equ_si_NodeOffset]);
    f_ci_Equ_xf2_Node_Ptr = &(dFdx[li_ci][A_ci_Equ_xf2_NodeOffset]);
    q_ci_Equ_xf2_Node_Ptr = &(dQdx[li_ci][A_ci_Equ_xf2_NodeOffset]);
    f_ci_Equ_bi_Node_Ptr = &(dFdx[li_ci][A_ci_Equ_bi_NodeOffset]);
    q_ci_Equ_bi_Node_Ptr = &(dQdx[li_ci][A_ci_Equ_bi_NodeOffset]);
    f_ci_Equ_ei_Node_Ptr = &(dFdx[li_ci][A_ci_Equ_ei_NodeOffset]);
    q_ci_Equ_ei_Node_Ptr = &(dQdx[li_ci][A_ci_Equ_ei_NodeOffset]);
    f_ci_Equ_ci_Node_Ptr = &(dFdx[li_ci][A_ci_Equ_ci_NodeOffset]);
    q_ci_Equ_ci_Node_Ptr = &(dQdx[li_ci][A_ci_Equ_ci_NodeOffset]);
    f_ci_Equ_dt_Node_Ptr = &(dFdx[li_ci][A_ci_Equ_dt_NodeOffset]);
    q_ci_Equ_dt_Node_Ptr = &(dQdx[li_ci][A_ci_Equ_dt_NodeOffset]);
    f_ci_Equ_bx_Node_Ptr = &(dFdx[li_ci][A_ci_Equ_bx_NodeOffset]);
    q_ci_Equ_bx_Node_Ptr = &(dQdx[li_ci][A_ci_Equ_bx_NodeOffset]);
    f_ci_Equ_bp_Node_Ptr = &(dFdx[li_ci][A_ci_Equ_bp_NodeOffset]);
    q_ci_Equ_bp_Node_Ptr = &(dQdx[li_ci][A_ci_Equ_bp_NodeOffset]);
    f_ci_Equ_si_Node_Ptr = &(dFdx[li_ci][A_ci_Equ_si_NodeOffset]);
    q_ci_Equ_si_Node_Ptr = &(dQdx[li_ci][A_ci_Equ_si_NodeOffset]);
    f_ci_Equ_cx_Node_Ptr = &(dFdx[li_ci][A_ci_Equ_cx_NodeOffset]);
    q_ci_Equ_cx_Node_Ptr = &(dQdx[li_ci][A_ci_Equ_cx_NodeOffset]);
    f_bx_Equ_bi_Node_Ptr = &(dFdx[li_bx][A_bx_Equ_bi_NodeOffset]);
    q_bx_Equ_bi_Node_Ptr = &(dQdx[li_bx][A_bx_Equ_bi_NodeOffset]);
    f_bx_Equ_ei_Node_Ptr = &(dFdx[li_bx][A_bx_Equ_ei_NodeOffset]);
    q_bx_Equ_ei_Node_Ptr = &(dQdx[li_bx][A_bx_Equ_ei_NodeOffset]);
    f_bx_Equ_ci_Node_Ptr = &(dFdx[li_bx][A_bx_Equ_ci_NodeOffset]);
    q_bx_Equ_ci_Node_Ptr = &(dQdx[li_bx][A_bx_Equ_ci_NodeOffset]);
    f_bx_Equ_bx_Node_Ptr = &(dFdx[li_bx][A_bx_Equ_bx_NodeOffset]);
    q_bx_Equ_bx_Node_Ptr = &(dQdx[li_bx][A_bx_Equ_bx_NodeOffset]);
    f_bx_Equ_bp_Node_Ptr = &(dFdx[li_bx][A_bx_Equ_bp_NodeOffset]);
    q_bx_Equ_bp_Node_Ptr = &(dQdx[li_bx][A_bx_Equ_bp_NodeOffset]);
    f_bx_Equ_si_Node_Ptr = &(dFdx[li_bx][A_bx_Equ_si_NodeOffset]);
    q_bx_Equ_si_Node_Ptr = &(dQdx[li_bx][A_bx_Equ_si_NodeOffset]);
    f_bx_Equ_dt_Node_Ptr = &(dFdx[li_bx][A_bx_Equ_dt_NodeOffset]);
    q_bx_Equ_dt_Node_Ptr = &(dQdx[li_bx][A_bx_Equ_dt_NodeOffset]);
    f_bx_Equ_cx_Node_Ptr = &(dFdx[li_bx][A_bx_Equ_cx_NodeOffset]);
    q_bx_Equ_cx_Node_Ptr = &(dQdx[li_bx][A_bx_Equ_cx_NodeOffset]);
    f_bx_Equ_c_Node_Ptr = &(dFdx[li_bx][A_bx_Equ_c_NodeOffset]);
    q_bx_Equ_c_Node_Ptr = &(dQdx[li_bx][A_bx_Equ_c_NodeOffset]);
    f_bx_Equ_b_Node_Ptr = &(dFdx[li_bx][A_bx_Equ_b_NodeOffset]);
    q_bx_Equ_b_Node_Ptr = &(dQdx[li_bx][A_bx_Equ_b_NodeOffset]);
    f_bi_Equ_bx_Node_Ptr = &(dFdx[li_bi][A_bi_Equ_bx_NodeOffset]);
    q_bi_Equ_bx_Node_Ptr = &(dQdx[li_bi][A_bi_Equ_bx_NodeOffset]);
    f_bi_Equ_bp_Node_Ptr = &(dFdx[li_bi][A_bi_Equ_bp_NodeOffset]);
    q_bi_Equ_bp_Node_Ptr = &(dQdx[li_bi][A_bi_Equ_bp_NodeOffset]);
    f_bi_Equ_si_Node_Ptr = &(dFdx[li_bi][A_bi_Equ_si_NodeOffset]);
    q_bi_Equ_si_Node_Ptr = &(dQdx[li_bi][A_bi_Equ_si_NodeOffset]);
    f_bi_Equ_bi_Node_Ptr = &(dFdx[li_bi][A_bi_Equ_bi_NodeOffset]);
    q_bi_Equ_bi_Node_Ptr = &(dQdx[li_bi][A_bi_Equ_bi_NodeOffset]);
    f_bi_Equ_ci_Node_Ptr = &(dFdx[li_bi][A_bi_Equ_ci_NodeOffset]);
    q_bi_Equ_ci_Node_Ptr = &(dQdx[li_bi][A_bi_Equ_ci_NodeOffset]);
    f_bi_Equ_ei_Node_Ptr = &(dFdx[li_bi][A_bi_Equ_ei_NodeOffset]);
    q_bi_Equ_ei_Node_Ptr = &(dQdx[li_bi][A_bi_Equ_ei_NodeOffset]);
    f_bi_Equ_dt_Node_Ptr = &(dFdx[li_bi][A_bi_Equ_dt_NodeOffset]);
    q_bi_Equ_dt_Node_Ptr = &(dQdx[li_bi][A_bi_Equ_dt_NodeOffset]);
    f_bi_Equ_xf2_Node_Ptr = &(dFdx[li_bi][A_bi_Equ_xf2_NodeOffset]);
    q_bi_Equ_xf2_Node_Ptr = &(dQdx[li_bi][A_bi_Equ_xf2_NodeOffset]);
    f_bi_Equ_cx_Node_Ptr = &(dFdx[li_bi][A_bi_Equ_cx_NodeOffset]);
    q_bi_Equ_cx_Node_Ptr = &(dQdx[li_bi][A_bi_Equ_cx_NodeOffset]);
    f_ei_Equ_bx_Node_Ptr = &(dFdx[li_ei][A_ei_Equ_bx_NodeOffset]);
    q_ei_Equ_bx_Node_Ptr = &(dQdx[li_ei][A_ei_Equ_bx_NodeOffset]);
    f_ei_Equ_bp_Node_Ptr = &(dFdx[li_ei][A_ei_Equ_bp_NodeOffset]);
    q_ei_Equ_bp_Node_Ptr = &(dQdx[li_ei][A_ei_Equ_bp_NodeOffset]);
    f_ei_Equ_si_Node_Ptr = &(dFdx[li_ei][A_ei_Equ_si_NodeOffset]);
    q_ei_Equ_si_Node_Ptr = &(dQdx[li_ei][A_ei_Equ_si_NodeOffset]);
    f_ei_Equ_bi_Node_Ptr = &(dFdx[li_ei][A_ei_Equ_bi_NodeOffset]);
    q_ei_Equ_bi_Node_Ptr = &(dQdx[li_ei][A_ei_Equ_bi_NodeOffset]);
    f_ei_Equ_ci_Node_Ptr = &(dFdx[li_ei][A_ei_Equ_ci_NodeOffset]);
    q_ei_Equ_ci_Node_Ptr = &(dQdx[li_ei][A_ei_Equ_ci_NodeOffset]);
    f_ei_Equ_ei_Node_Ptr = &(dFdx[li_ei][A_ei_Equ_ei_NodeOffset]);
    q_ei_Equ_ei_Node_Ptr = &(dQdx[li_ei][A_ei_Equ_ei_NodeOffset]);
    f_ei_Equ_dt_Node_Ptr = &(dFdx[li_ei][A_ei_Equ_dt_NodeOffset]);
    q_ei_Equ_dt_Node_Ptr = &(dQdx[li_ei][A_ei_Equ_dt_NodeOffset]);
    f_ei_Equ_xf2_Node_Ptr = &(dFdx[li_ei][A_ei_Equ_xf2_NodeOffset]);
    q_ei_Equ_xf2_Node_Ptr = &(dQdx[li_ei][A_ei_Equ_xf2_NodeOffset]);
    f_ei_Equ_e_Node_Ptr = &(dFdx[li_ei][A_ei_Equ_e_NodeOffset]);
    q_ei_Equ_e_Node_Ptr = &(dQdx[li_ei][A_ei_Equ_e_NodeOffset]);
    f_ei_Equ_cx_Node_Ptr = &(dFdx[li_ei][A_ei_Equ_cx_NodeOffset]);
    q_ei_Equ_cx_Node_Ptr = &(dQdx[li_ei][A_ei_Equ_cx_NodeOffset]);
    f_bp_Equ_bi_Node_Ptr = &(dFdx[li_bp][A_bp_Equ_bi_NodeOffset]);
    q_bp_Equ_bi_Node_Ptr = &(dQdx[li_bp][A_bp_Equ_bi_NodeOffset]);
    f_bp_Equ_ei_Node_Ptr = &(dFdx[li_bp][A_bp_Equ_ei_NodeOffset]);
    q_bp_Equ_ei_Node_Ptr = &(dQdx[li_bp][A_bp_Equ_ei_NodeOffset]);
    f_bp_Equ_ci_Node_Ptr = &(dFdx[li_bp][A_bp_Equ_ci_NodeOffset]);
    q_bp_Equ_ci_Node_Ptr = &(dQdx[li_bp][A_bp_Equ_ci_NodeOffset]);
    f_bp_Equ_bx_Node_Ptr = &(dFdx[li_bp][A_bp_Equ_bx_NodeOffset]);
    q_bp_Equ_bx_Node_Ptr = &(dQdx[li_bp][A_bp_Equ_bx_NodeOffset]);
    f_bp_Equ_bp_Node_Ptr = &(dFdx[li_bp][A_bp_Equ_bp_NodeOffset]);
    q_bp_Equ_bp_Node_Ptr = &(dQdx[li_bp][A_bp_Equ_bp_NodeOffset]);
    f_bp_Equ_si_Node_Ptr = &(dFdx[li_bp][A_bp_Equ_si_NodeOffset]);
    q_bp_Equ_si_Node_Ptr = &(dQdx[li_bp][A_bp_Equ_si_NodeOffset]);
    f_bp_Equ_dt_Node_Ptr = &(dFdx[li_bp][A_bp_Equ_dt_NodeOffset]);
    q_bp_Equ_dt_Node_Ptr = &(dQdx[li_bp][A_bp_Equ_dt_NodeOffset]);
    f_bp_Equ_cx_Node_Ptr = &(dFdx[li_bp][A_bp_Equ_cx_NodeOffset]);
    q_bp_Equ_cx_Node_Ptr = &(dQdx[li_bp][A_bp_Equ_cx_NodeOffset]);
    f_si_Equ_bi_Node_Ptr = &(dFdx[li_si][A_si_Equ_bi_NodeOffset]);
    q_si_Equ_bi_Node_Ptr = &(dQdx[li_si][A_si_Equ_bi_NodeOffset]);
    f_si_Equ_ei_Node_Ptr = &(dFdx[li_si][A_si_Equ_ei_NodeOffset]);
    q_si_Equ_ei_Node_Ptr = &(dQdx[li_si][A_si_Equ_ei_NodeOffset]);
    f_si_Equ_ci_Node_Ptr = &(dFdx[li_si][A_si_Equ_ci_NodeOffset]);
    q_si_Equ_ci_Node_Ptr = &(dQdx[li_si][A_si_Equ_ci_NodeOffset]);
    f_si_Equ_bx_Node_Ptr = &(dFdx[li_si][A_si_Equ_bx_NodeOffset]);
    q_si_Equ_bx_Node_Ptr = &(dQdx[li_si][A_si_Equ_bx_NodeOffset]);
    f_si_Equ_bp_Node_Ptr = &(dFdx[li_si][A_si_Equ_bp_NodeOffset]);
    q_si_Equ_bp_Node_Ptr = &(dQdx[li_si][A_si_Equ_bp_NodeOffset]);
    f_si_Equ_si_Node_Ptr = &(dFdx[li_si][A_si_Equ_si_NodeOffset]);
    q_si_Equ_si_Node_Ptr = &(dQdx[li_si][A_si_Equ_si_NodeOffset]);
    f_si_Equ_dt_Node_Ptr = &(dFdx[li_si][A_si_Equ_dt_NodeOffset]);
    q_si_Equ_dt_Node_Ptr = &(dQdx[li_si][A_si_Equ_dt_NodeOffset]);
    f_si_Equ_s_Node_Ptr = &(dFdx[li_si][A_si_Equ_s_NodeOffset]);
    q_si_Equ_s_Node_Ptr = &(dQdx[li_si][A_si_Equ_s_NodeOffset]);
    f_xf1_Equ_bi_Node_Ptr = &(dFdx[li_xf1][A_xf1_Equ_bi_NodeOffset]);
    q_xf1_Equ_bi_Node_Ptr = &(dQdx[li_xf1][A_xf1_Equ_bi_NodeOffset]);
    f_xf1_Equ_ci_Node_Ptr = &(dFdx[li_xf1][A_xf1_Equ_ci_NodeOffset]);
    q_xf1_Equ_ci_Node_Ptr = &(dQdx[li_xf1][A_xf1_Equ_ci_NodeOffset]);
    f_xf1_Equ_ei_Node_Ptr = &(dFdx[li_xf1][A_xf1_Equ_ei_NodeOffset]);
    q_xf1_Equ_ei_Node_Ptr = &(dQdx[li_xf1][A_xf1_Equ_ei_NodeOffset]);
    f_xf1_Equ_dt_Node_Ptr = &(dFdx[li_xf1][A_xf1_Equ_dt_NodeOffset]);
    q_xf1_Equ_dt_Node_Ptr = &(dQdx[li_xf1][A_xf1_Equ_dt_NodeOffset]);
    f_xf1_Equ_xf2_Node_Ptr = &(dFdx[li_xf1][A_xf1_Equ_xf2_NodeOffset]);
    q_xf1_Equ_xf2_Node_Ptr = &(dQdx[li_xf1][A_xf1_Equ_xf2_NodeOffset]);
    f_xf1_Equ_xf1_Node_Ptr = &(dFdx[li_xf1][A_xf1_Equ_xf1_NodeOffset]);
    q_xf1_Equ_xf1_Node_Ptr = &(dQdx[li_xf1][A_xf1_Equ_xf1_NodeOffset]);
    f_xf2_Equ_xf1_Node_Ptr = &(dFdx[li_xf2][A_xf2_Equ_xf1_NodeOffset]);
    q_xf2_Equ_xf1_Node_Ptr = &(dQdx[li_xf2][A_xf2_Equ_xf1_NodeOffset]);
    f_xf2_Equ_xf2_Node_Ptr = &(dFdx[li_xf2][A_xf2_Equ_xf2_NodeOffset]);
    q_xf2_Equ_xf2_Node_Ptr = &(dQdx[li_xf2][A_xf2_Equ_xf2_NodeOffset]);


}

// RHS load functions

//-----------------------------------------------------------------------------
// Function      : Instance::loadDAEFVector
// Purpose       : load F vector (static contributions) for one instance for
//                 NEW DAE formulation
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
bool Instance::loadDAEFVector()
{

  bool bsuccess=true;
(*extData.daeFVectorPtr)[li_c] += staticContributions[admsNodeID_c];
(*extData.daeFVectorPtr)[li_b] += staticContributions[admsNodeID_b];
(*extData.daeFVectorPtr)[li_e] += staticContributions[admsNodeID_e];
(*extData.daeFVectorPtr)[li_s] += staticContributions[admsNodeID_s];
(*extData.daeFVectorPtr)[li_dt] += staticContributions[admsNodeID_dt];
(*extData.daeFVectorPtr)[li_cx] += staticContributions[admsNodeID_cx];
(*extData.daeFVectorPtr)[li_ci] += staticContributions[admsNodeID_ci];
(*extData.daeFVectorPtr)[li_bx] += staticContributions[admsNodeID_bx];
(*extData.daeFVectorPtr)[li_bi] += staticContributions[admsNodeID_bi];
(*extData.daeFVectorPtr)[li_ei] += staticContributions[admsNodeID_ei];
(*extData.daeFVectorPtr)[li_bp] += staticContributions[admsNodeID_bp];
(*extData.daeFVectorPtr)[li_si] += staticContributions[admsNodeID_si];
(*extData.daeFVectorPtr)[li_xf1] += staticContributions[admsNodeID_xf1];
(*extData.daeFVectorPtr)[li_xf2] += staticContributions[admsNodeID_xf2];

  if (getDeviceOptions().voltageLimiterFlag && !origFlag)
  {
    double *dFdxdVp = extData.dFdxdVpVectorRawPtr;
dFdxdVp[li_c] += Jdxp_static[admsNodeID_c];
dFdxdVp[li_b] += Jdxp_static[admsNodeID_b];
dFdxdVp[li_e] += Jdxp_static[admsNodeID_e];
dFdxdVp[li_s] += Jdxp_static[admsNodeID_s];
dFdxdVp[li_dt] += Jdxp_static[admsNodeID_dt];
dFdxdVp[li_cx] += Jdxp_static[admsNodeID_cx];
dFdxdVp[li_ci] += Jdxp_static[admsNodeID_ci];
dFdxdVp[li_bx] += Jdxp_static[admsNodeID_bx];
dFdxdVp[li_bi] += Jdxp_static[admsNodeID_bi];
dFdxdVp[li_ei] += Jdxp_static[admsNodeID_ei];
dFdxdVp[li_bp] += Jdxp_static[admsNodeID_bp];
dFdxdVp[li_si] += Jdxp_static[admsNodeID_si];
dFdxdVp[li_xf1] += Jdxp_static[admsNodeID_xf1];
dFdxdVp[li_xf2] += Jdxp_static[admsNodeID_xf2];


  }

  if (loadLeadCurrent)
  {
    double * leadF = extData.nextLeadCurrFCompRawPtr;
    leadF[li_branch_ic] = leadCurrentF[admsNodeID_c];
    leadF[li_branch_ib] = leadCurrentF[admsNodeID_b];
    leadF[li_branch_ie] = leadCurrentF[admsNodeID_e];
    leadF[li_branch_is] = leadCurrentF[admsNodeID_s];



    // here we have to do special things for BJTs, MOSFETs and 2-terminal
    // devices for power computation.

        double * solVec = extData.nextSolVectorRawPtr;
        double * junctionV = extData.nextJunctionVCompRawPtr;
        junctionV[li_branch_ic] = solVec[li_c] - solVec[li_e];
        junctionV[li_branch_ib] = solVec[li_b] - solVec[li_e];

  }
  return bsuccess;
}

//-----------------------------------------------------------------------------
// Function      : Instance::loadDAEQVector
// Purpose       : load Q vector (dynamic contributions) for one instance for
//                 NEW DAE formulation
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
bool Instance::loadDAEQVector()
{
(*extData.daeQVectorPtr)[li_c] += dynamicContributions[admsNodeID_c];
(*extData.daeQVectorPtr)[li_b] += dynamicContributions[admsNodeID_b];
(*extData.daeQVectorPtr)[li_e] += dynamicContributions[admsNodeID_e];
(*extData.daeQVectorPtr)[li_s] += dynamicContributions[admsNodeID_s];
(*extData.daeQVectorPtr)[li_dt] += dynamicContributions[admsNodeID_dt];
(*extData.daeQVectorPtr)[li_cx] += dynamicContributions[admsNodeID_cx];
(*extData.daeQVectorPtr)[li_ci] += dynamicContributions[admsNodeID_ci];
(*extData.daeQVectorPtr)[li_bx] += dynamicContributions[admsNodeID_bx];
(*extData.daeQVectorPtr)[li_bi] += dynamicContributions[admsNodeID_bi];
(*extData.daeQVectorPtr)[li_ei] += dynamicContributions[admsNodeID_ei];
(*extData.daeQVectorPtr)[li_bp] += dynamicContributions[admsNodeID_bp];
(*extData.daeQVectorPtr)[li_si] += dynamicContributions[admsNodeID_si];
(*extData.daeQVectorPtr)[li_xf1] += dynamicContributions[admsNodeID_xf1];
(*extData.daeQVectorPtr)[li_xf2] += dynamicContributions[admsNodeID_xf2];

  if (getDeviceOptions().voltageLimiterFlag && !origFlag)
  {
    double *dQdxdVp = extData.dQdxdVpVectorRawPtr;
dQdxdVp[li_c] += Jdxp_dynamic[admsNodeID_c];
dQdxdVp[li_b] += Jdxp_dynamic[admsNodeID_b];
dQdxdVp[li_e] += Jdxp_dynamic[admsNodeID_e];
dQdxdVp[li_s] += Jdxp_dynamic[admsNodeID_s];
dQdxdVp[li_dt] += Jdxp_dynamic[admsNodeID_dt];
dQdxdVp[li_cx] += Jdxp_dynamic[admsNodeID_cx];
dQdxdVp[li_ci] += Jdxp_dynamic[admsNodeID_ci];
dQdxdVp[li_bx] += Jdxp_dynamic[admsNodeID_bx];
dQdxdVp[li_bi] += Jdxp_dynamic[admsNodeID_bi];
dQdxdVp[li_ei] += Jdxp_dynamic[admsNodeID_ei];
dQdxdVp[li_bp] += Jdxp_dynamic[admsNodeID_bp];
dQdxdVp[li_si] += Jdxp_dynamic[admsNodeID_si];
dQdxdVp[li_xf1] += Jdxp_dynamic[admsNodeID_xf1];
dQdxdVp[li_xf2] += Jdxp_dynamic[admsNodeID_xf2];

  }

  if (loadLeadCurrent)
  {
    double * leadQ = extData.nextLeadCurrQCompRawPtr;
    leadQ[li_branch_ic] = leadCurrentQ[admsNodeID_c];
    leadQ[li_branch_ib] = leadCurrentQ[admsNodeID_b];
    leadQ[li_branch_ie] = leadCurrentQ[admsNodeID_e];
    leadQ[li_branch_is] = leadCurrentQ[admsNodeID_s];


  }
  return true;
}


//-----------------------------------------------------------------------------
// Function      : Instance::updatePrimaryState
// Purpose       :
// Special Notes : In this initial implementation, does little more than
//                 call updateIntermediateVars()
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
bool Instance::updatePrimaryState()
{
  bool bsuccess = true;

  bsuccess = updateIntermediateVars();

  // if old DAE were implemented, we'd save dynamic contributions as state
  // here.

  double * stoVec = extData.nextStoVectorRawPtr;
  // Also need to save limited voltage drops and output vars
  // This formulation assumes that we have *always* written the
  // limited voltages back into the probeVars[] array.

  stoVec[li_store_admsProbeID_Temp_dt_GND] = probeVars[admsProbeID_Temp_dt_GND];
  stoVec[li_store_admsProbeID_V_bi_ei] = probeVars[admsProbeID_V_bi_ei];
  stoVec[li_store_admsProbeID_V_bx_ei] = probeVars[admsProbeID_V_bx_ei];
  stoVec[li_store_admsProbeID_V_bi_ci] = probeVars[admsProbeID_V_bi_ci];
  stoVec[li_store_admsProbeID_V_bi_cx] = probeVars[admsProbeID_V_bi_cx];
  stoVec[li_store_admsProbeID_V_bx_cx] = probeVars[admsProbeID_V_bx_cx];
  stoVec[li_store_admsProbeID_V_bx_bp] = probeVars[admsProbeID_V_bx_bp];
  stoVec[li_store_admsProbeID_V_b_e] = probeVars[admsProbeID_V_b_e];

  return bsuccess;
}

//-----------------------------------------------------------------------------
// Function      : Instance::updateSecondaryState
// Purpose       :
// Special Notes : In this initial implementation, does nothing
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
bool Instance::updateSecondaryState()
{
  bool bsuccess = true;

  // were old DAE implemented, we'd pull dynamic contribution derivatives
  // out of state.

  return bsuccess;
}

//-----------------------------------------------------------------------------
// Function      : Instance::updateIntermediateVars
// Purpose       : update intermediate variables for one vbic13_4t instance
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
bool Instance::updateIntermediateVars()
{

  bool bsuccess=true;
  Linear::Vector * solVectorPtr = extData.nextSolVectorPtr;

  if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
  {
    Xyce::dout() << std::endl << subsection_divider << std::endl;
    Xyce::dout() << "  In ADMSvbic13_4t::Instance::updateIntermediateVars\n\n";
    Xyce::dout() << "  name = " << getName() << std::endl;
  }

  // Local variables
  double qdbcp=0.0;
     double d_qdbcp_dV_si_bp=0.0;
     double d_qdbcp_dTemp_dt_GND=0.0;
  double qdbex=0.0;
     double d_qdbex_dV_bx_ei=0.0;
     double d_qdbex_dTemp_dt_GND=0.0;
  double qdbep=0.0;
     double d_qdbep_dV_bx_bp=0.0;
     double d_qdbep_dTemp_dt_GND=0.0;
  double sgIf=0.0;
     double d_sgIf_dTemp_dt_GND=0.0;
     double d_sgIf_dV_bi_ei=0.0;
  double rIf=0.0;
     double d_rIf_dTemp_dt_GND=0.0;
     double d_rIf_dV_bi_ei=0.0;
  double mIf=0.0;
     double d_mIf_dTemp_dt_GND=0.0;
     double d_mIf_dV_bi_ei=0.0;
  double tff=0.0;
     double d_tff_dV_bi_ei=0.0;
     double d_tff_dTemp_dt_GND=0.0;
     double d_tff_dV_bi_ci=0.0;
     double d_tff_dV_bi_cx=0.0;
     double d_tff_dV_bx_ei=0.0;
     double d_tff_dV_si_bp=0.0;
     double d_tff_dV_bx_bp=0.0;
  double Qbe=0.0;
     double d_Qbe_dTemp_dt_GND=0.0;
     double d_Qbe_dV_bi_ei=0.0;
     double d_Qbe_dV_bi_ci=0.0;
     double d_Qbe_dV_bi_cx=0.0;
     double d_Qbe_dV_bx_ei=0.0;
     double d_Qbe_dV_si_bp=0.0;
     double d_Qbe_dV_bx_bp=0.0;
  double Qbex=0.0;
     double d_Qbex_dTemp_dt_GND=0.0;
     double d_Qbex_dV_bx_ei=0.0;
  double Qbc=0.0;
     double d_Qbc_dTemp_dt_GND=0.0;
     double d_Qbc_dV_bi_ci=0.0;
     double d_Qbc_dV_bi_ei=0.0;
     double d_Qbc_dV_bx_ei=0.0;
     double d_Qbc_dV_si_bp=0.0;
     double d_Qbc_dV_bx_bp=0.0;
  double Qbcx=0.0;
     double d_Qbcx_dTemp_dt_GND=0.0;
     double d_Qbcx_dV_bi_cx=0.0;
     double d_Qbcx_dV_bx_bp=0.0;
     double d_Qbcx_dV_bi_ei=0.0;
     double d_Qbcx_dV_bi_ci=0.0;
  double Qbep=0.0;
     double d_Qbep_dTemp_dt_GND=0.0;
     double d_Qbep_dV_bx_bp=0.0;
     double d_Qbep_dV_bi_ci=0.0;
     double d_Qbep_dV_bi_ei=0.0;
  double Qbcp=0.0;
     double d_Qbcp_dTemp_dt_GND=0.0;
     double d_Qbcp_dV_si_bp=0.0;
  double Qbeo=0.0;
     double d_Qbeo_dV_b_e=0.0;
  double Qbco=0.0;
     double d_Qbco_dV_b_c=0.0;
  double Qcth=0.0;
     double d_Qcth_dTemp_dt_GND=0.0;
  double Qxf1=0.0;
     double d_Qxf1_dV_xf1_GND=0.0;
  double Qxf2=0.0;
     double d_Qxf2_dV_xf2_GND=0.0;
  double dt_et=0.0;
     double d_dt_et_dTemp_dt_GND=0.0;
  double dT=0.0;
     double d_dT_dTemp_dt_GND=0.0;
  double ikf_t=0.0;
     double d_ikf_t_dTemp_dt_GND=0.0;
  double rcx_t=0.0;
     double d_rcx_t_dTemp_dt_GND=0.0;
  double rci_t=0.0;
     double d_rci_t_dTemp_dt_GND=0.0;
  double rbx_t=0.0;
     double d_rbx_t_dTemp_dt_GND=0.0;
  double rbi_t=0.0;
     double d_rbi_t_dTemp_dt_GND=0.0;
  double re_t=0.0;
     double d_re_t_dTemp_dt_GND=0.0;
  double rs_t=0.0;
     double d_rs_t_dTemp_dt_GND=0.0;
  double rbp_t=0.0;
     double d_rbp_t_dTemp_dt_GND=0.0;
  double rth_t=0.0;
     double d_rth_t_dTemp_dt_GND=0.0;
  double nf_t=0.0;
     double d_nf_t_dTemp_dt_GND=0.0;
  double nr_t=0.0;
     double d_nr_t_dTemp_dt_GND=0.0;
  double avc2_t=0.0;
     double d_avc2_t_dTemp_dt_GND=0.0;
  double avcx2_t=0.0;
     double d_avcx2_t_dTemp_dt_GND=0.0;
  double vbbe_t=0.0;
     double d_vbbe_t_dTemp_dt_GND=0.0;
  double nbbe_t=0.0;
     double d_nbbe_t_dTemp_dt_GND=0.0;
  double pe_t=0.0;
     double d_pe_t_dTemp_dt_GND=0.0;
  double pc_t=0.0;
     double d_pc_t_dTemp_dt_GND=0.0;
  double ps_t=0.0;
     double d_ps_t_dTemp_dt_GND=0.0;
  double cje_t=0.0;
     double d_cje_t_dTemp_dt_GND=0.0;
  double cjc_t=0.0;
     double d_cjc_t_dTemp_dt_GND=0.0;
  double cjep_t=0.0;
     double d_cjep_t_dTemp_dt_GND=0.0;
  double cjcp_t=0.0;
     double d_cjcp_t_dTemp_dt_GND=0.0;
  double gamm_t=0.0;
     double d_gamm_t_dTemp_dt_GND=0.0;
  double vo_t=0.0;
     double d_vo_t_dTemp_dt_GND=0.0;
  double ebbe_t=0.0;
     double d_ebbe_t_dTemp_dt_GND=0.0;
  double vef_t=0.0;
     double d_vef_t_dTemp_dt_GND=0.0;
  double ver_t=0.0;
     double d_ver_t_dTemp_dt_GND=0.0;
  double Gth=0.0;
     double d_Gth_dTemp_dt_GND=0.0;
  double Ivef=0.0;
     double d_Ivef_dTemp_dt_GND=0.0;
  double Iver=0.0;
     double d_Iver_dTemp_dt_GND=0.0;
  double Iikf=0.0;
     double d_Iikf_dTemp_dt_GND=0.0;
  double Ivo=0.0;
     double d_Ivo_dTemp_dt_GND=0.0;
  double Vbei=0.0;
     double d_Vbei_dV_bi_ei=0.0;
  double Vbex=0.0;
     double d_Vbex_dV_bx_ei=0.0;
  double Vbci=0.0;
     double d_Vbci_dV_bi_ci=0.0;
  double Vbcx=0.0;
     double d_Vbcx_dV_bi_cx=0.0;
  double Vbxcx=0.0;
     double d_Vbxcx_dV_bx_cx=0.0;
  double Vcei=0.0;
     double d_Vcei_dV_ci_ei=0.0;
  double Vbep=0.0;
     double d_Vbep_dV_bx_bp=0.0;
  double Vbe=0.0;
     double d_Vbe_dV_b_e=0.0;
  double Vbc=0.0;
     double d_Vbc_dV_b_c=0.0;
  double Vrcx=0.0;
     double d_Vrcx_dV_c_cx=0.0;
  double Vrbx=0.0;
     double d_Vrbx_dV_b_bx=0.0;
  double Vrbi=0.0;
     double d_Vrbi_dV_bx_bi=0.0;
  double Vre=0.0;
     double d_Vre_dV_e_ei=0.0;
  double Vrbp=0.0;
     double d_Vrbp_dV_bp_cx=0.0;
  double Vbcp=0.0;
     double d_Vbcp_dV_si_bp=0.0;
  double Vcep=0.0;
     double d_Vcep_dV_bx_si=0.0;
  double Vrs=0.0;
     double d_Vrs_dV_s_si=0.0;
  double Vxf1=0.0;
     double d_Vxf1_dV_xf1_GND=0.0;
  double Vxf2=0.0;
     double d_Vxf2_dV_xf2_GND=0.0;
  double qdbe=0.0;
     double d_qdbe_dV_bi_ei=0.0;
     double d_qdbe_dTemp_dt_GND=0.0;
  double qdbc=0.0;
     double d_qdbc_dV_bi_ci=0.0;
     double d_qdbc_dTemp_dt_GND=0.0;
  double afac=0.0;
     double d_afac_dTemp_dt_GND=0.0;
  double expi=0.0;
     double d_expi_dV_bi_cx=0.0;
     double d_expi_dV_bx_ei=0.0;
     double d_expi_dV_si_bp=0.0;
     double d_expi_dV_bx_bp=0.0;
     double d_expi_dV_bi_ci=0.0;
     double d_expi_dV_bi_ei=0.0;
     double d_expi_dTemp_dt_GND=0.0;
  double Ifi=0.0;
     double d_Ifi_dTemp_dt_GND=0.0;
     double d_Ifi_dV_bi_ei=0.0;
  double Iri=0.0;
     double d_Iri_dTemp_dt_GND=0.0;
     double d_Iri_dV_bi_ci=0.0;
     double d_Iri_dV_bi_ei=0.0;
  double q1z=0.0;
     double d_q1z_dV_bi_ei=0.0;
     double d_q1z_dTemp_dt_GND=0.0;
     double d_q1z_dV_bi_ci=0.0;
  double q1=0.0;
     double d_q1_dV_bi_ei=0.0;
     double d_q1_dTemp_dt_GND=0.0;
     double d_q1_dV_bi_ci=0.0;
  double q2=0.0;
     double d_q2_dTemp_dt_GND=0.0;
     double d_q2_dV_bi_ei=0.0;
     double d_q2_dV_bi_ci=0.0;
  double arg=0.0;
     double d_arg_dV_bi_cx=0.0;
     double d_arg_dV_bx_bp=0.0;
     double d_arg_dV_bi_ei=0.0;
     double d_arg_dTemp_dt_GND=0.0;
     double d_arg_dV_bi_ci=0.0;
  double Itzr=0.0;
     double d_Itzr_dTemp_dt_GND=0.0;
     double d_Itzr_dV_bi_ci=0.0;
     double d_Itzr_dV_bi_ei=0.0;
  double Itxf=0.0;
     double d_Itxf_dV_xf2_GND=0.0;
  double expx=0.0;
     double d_expx_dV_bi_cx=0.0;
     double d_expx_dV_bx_bp=0.0;
     double d_expx_dV_bi_ei=0.0;
     double d_expx_dV_bi_ci=0.0;
     double d_expx_dTemp_dt_GND=0.0;
  double Ifp=0.0;
     double d_Ifp_dTemp_dt_GND=0.0;
     double d_Ifp_dV_bx_bp=0.0;
     double d_Ifp_dV_bi_ci=0.0;
     double d_Ifp_dV_bi_ei=0.0;
  double q2p=0.0;
     double d_q2p_dTemp_dt_GND=0.0;
     double d_q2p_dV_bx_bp=0.0;
     double d_q2p_dV_bi_ci=0.0;
     double d_q2p_dV_bi_ei=0.0;
  double Irp=0.0;
     double d_Irp_dTemp_dt_GND=0.0;
     double d_Irp_dV_si_bp=0.0;
     double d_Irp_dV_bx_bp=0.0;
     double d_Irp_dV_bi_ci=0.0;
     double d_Irp_dV_bi_ei=0.0;
  double expn=0.0;
     double d_expn_dV_si_bp=0.0;
     double d_expn_dV_bx_bp=0.0;
     double d_expn_dV_bi_ci=0.0;
     double d_expn_dV_bx_ei=0.0;
     double d_expn_dV_bi_ei=0.0;
     double d_expn_dTemp_dt_GND=0.0;
  double Bvbe=0.0;
     double d_Bvbe_dTemp_dt_GND=0.0;
     double d_Bvbe_dV_bi_ei=0.0;
  double Ibcj=0.0;
     double d_Ibcj_dTemp_dt_GND=0.0;
     double d_Ibcj_dV_bx_ei=0.0;
     double d_Ibcj_dV_si_bp=0.0;
     double d_Ibcj_dV_bx_bp=0.0;
     double d_Ibcj_dV_bi_ci=0.0;
     double d_Ibcj_dV_bi_ei=0.0;
  double Kbci=0.0;
     double d_Kbci_dTemp_dt_GND=0.0;
     double d_Kbci_dV_bx_ei=0.0;
     double d_Kbci_dV_si_bp=0.0;
     double d_Kbci_dV_bx_bp=0.0;
     double d_Kbci_dV_bi_ci=0.0;
     double d_Kbci_dV_bi_ei=0.0;
  double Kbcx=0.0;
     double d_Kbcx_dTemp_dt_GND=0.0;
     double d_Kbcx_dV_bi_cx=0.0;
     double d_Kbcx_dV_bx_bp=0.0;
     double d_Kbcx_dV_bi_ei=0.0;
     double d_Kbcx_dV_bi_ci=0.0;
  double Ircx=0.0;
     double d_Ircx_dV_c_cx=0.0;
     double d_Ircx_dTemp_dt_GND=0.0;
  double rKp1=0.0;
     double d_rKp1_dTemp_dt_GND=0.0;
     double d_rKp1_dV_bx_ei=0.0;
     double d_rKp1_dV_si_bp=0.0;
     double d_rKp1_dV_bx_bp=0.0;
     double d_rKp1_dV_bi_ci=0.0;
     double d_rKp1_dV_bi_ei=0.0;
     double d_rKp1_dV_bi_cx=0.0;
  double Iohm=0.0;
     double d_Iohm_dV_cx_ci=0.0;
     double d_Iohm_dTemp_dt_GND=0.0;
     double d_Iohm_dV_bx_ei=0.0;
     double d_Iohm_dV_si_bp=0.0;
     double d_Iohm_dV_bx_bp=0.0;
     double d_Iohm_dV_bi_ci=0.0;
     double d_Iohm_dV_bi_ei=0.0;
     double d_Iohm_dV_bi_cx=0.0;
  double derf=0.0;
     double d_derf_dTemp_dt_GND=0.0;
     double d_derf_dV_cx_ci=0.0;
     double d_derf_dV_bx_ei=0.0;
     double d_derf_dV_si_bp=0.0;
     double d_derf_dV_bx_bp=0.0;
     double d_derf_dV_bi_ci=0.0;
     double d_derf_dV_bi_ei=0.0;
     double d_derf_dV_bi_cx=0.0;
  double Irbx=0.0;
     double d_Irbx_dV_b_bx=0.0;
     double d_Irbx_dTemp_dt_GND=0.0;
  double Irbi=0.0;
     double d_Irbi_dV_bx_bi=0.0;
     double d_Irbi_dV_bi_ei=0.0;
     double d_Irbi_dTemp_dt_GND=0.0;
     double d_Irbi_dV_bi_ci=0.0;
  double Ire=0.0;
     double d_Ire_dV_e_ei=0.0;
     double d_Ire_dTemp_dt_GND=0.0;
  double Irbp=0.0;
     double d_Irbp_dV_bp_cx=0.0;
     double d_Irbp_dV_bx_bp=0.0;
     double d_Irbp_dV_bi_ei=0.0;
     double d_Irbp_dTemp_dt_GND=0.0;
     double d_Irbp_dV_bi_ci=0.0;
  double Irs=0.0;
     double d_Irs_dV_s_si=0.0;
     double d_Irs_dTemp_dt_GND=0.0;
  double avalf=0.0;
     double d_avalf_dV_bx_cx=0.0;
     double d_avalf_dTemp_dt_GND=0.0;
     double d_avalf_dV_bi_ci=0.0;
  double Igc=0.0;
     double d_Igc_dV_xf2_GND=0.0;
     double d_Igc_dTemp_dt_GND=0.0;
     double d_Igc_dV_bi_ci=0.0;
     double d_Igc_dV_bi_ei=0.0;
     double d_Igc_dV_bx_ei=0.0;
     double d_Igc_dV_si_bp=0.0;
     double d_Igc_dV_bx_bp=0.0;
  double Igcx=0.0;
     double d_Igcx_dV_c_cx=0.0;
     double d_Igcx_dTemp_dt_GND=0.0;
     double d_Igcx_dV_bx_cx=0.0;
     double d_Igcx_dV_bi_ci=0.0;
  double VcbFac=0.0;
     double d_VcbFac_dV_bi_ci=0.0;
  double Iibk=0.0;
     double d_Iibk_dV_bi_ci=0.0;
  double Ibk=0.0;
     double d_Ibk_dTemp_dt_GND=0.0;
     double d_Ibk_dV_bi_ei=0.0;
     double d_Ibk_dV_bi_ci=0.0;
  double Ibc=0.0;
     double d_Ibc_dTemp_dt_GND=0.0;
     double d_Ibc_dV_bx_ei=0.0;
     double d_Ibc_dV_si_bp=0.0;
     double d_Ibc_dV_bx_bp=0.0;
     double d_Ibc_dV_bi_ci=0.0;
     double d_Ibc_dV_bi_ei=0.0;
     double d_Ibc_dV_xf2_GND=0.0;
  double Ibcp=0.0;
     double d_Ibcp_dTemp_dt_GND=0.0;
     double d_Ibcp_dV_bx_ei=0.0;
     double d_Ibcp_dV_si_bp=0.0;
     double d_Ibcp_dV_bx_bp=0.0;
     double d_Ibcp_dV_bi_ci=0.0;
     double d_Ibcp_dV_bi_ei=0.0;
  double power=0.0;
     double d_power_dV_bx_ei=0.0;
     double d_power_dTemp_dt_GND=0.0;
     double d_power_dV_bi_ei=0.0;
     double d_power_dV_bi_ci=0.0;
     double d_power_dV_si_bp=0.0;
     double d_power_dV_bx_bp=0.0;
     double d_power_dV_xf2_GND=0.0;
     double d_power_dV_ci_ei=0.0;
     double d_power_dV_s_si=0.0;
     double d_power_dV_bx_si=0.0;
     double d_power_dV_c_cx=0.0;
     double d_power_dV_cx_ci=0.0;
     double d_power_dV_bi_cx=0.0;
     double d_power_dV_b_bx=0.0;
     double d_power_dV_bx_bi=0.0;
     double d_power_dV_e_ei=0.0;
     double d_power_dV_bp_cx=0.0;
  double Ith=0.0;
     double d_Ith_dV_bx_ei=0.0;
     double d_Ith_dTemp_dt_GND=0.0;
     double d_Ith_dV_bi_ei=0.0;
     double d_Ith_dV_bi_ci=0.0;
     double d_Ith_dV_si_bp=0.0;
     double d_Ith_dV_bx_bp=0.0;
     double d_Ith_dV_xf2_GND=0.0;
     double d_Ith_dV_ci_ei=0.0;
     double d_Ith_dV_s_si=0.0;
     double d_Ith_dV_bx_si=0.0;
     double d_Ith_dV_c_cx=0.0;
     double d_Ith_dV_cx_ci=0.0;
     double d_Ith_dV_bi_cx=0.0;
     double d_Ith_dV_b_bx=0.0;
     double d_Ith_dV_bx_bi=0.0;
     double d_Ith_dV_e_ei=0.0;
     double d_Ith_dV_bp_cx=0.0;
  double Irth=0.0;
     double d_Irth_dTemp_dt_GND=0.0;
  double Ixf1=0.0;
     double d_Ixf1_dV_xf2_GND=0.0;
     double d_Ixf1_dTemp_dt_GND=0.0;
     double d_Ixf1_dV_bi_ei=0.0;
     double d_Ixf1_dV_bi_ci=0.0;
  double Ixf2=0.0;
     double d_Ixf2_dV_xf2_GND=0.0;
     double d_Ixf2_dV_xf1_GND=0.0;
 // temporary variables for limiting
 double Vbe_orig,Vbe_limited,Vbe_old;
 double Vbep_orig,Vbep_limited,Vbep_old;
 double Vbxcx_orig,Vbxcx_limited,Vbxcx_old;
 double Vbcx_orig,Vbcx_limited,Vbcx_old;
 double Vbci_orig,Vbci_limited,Vbci_old;
 double Vbex_orig,Vbex_limited,Vbex_old;
 double Vbei_orig,Vbei_limited,Vbei_old;
 double dt_et_orig,dt_et_limited,dt_et_old;


  // set the sizes of the Fad arrays:

  if (probeVars.size() != (21))
  {
    probeVars.resize(21);
    d_probeVars.resize(21);
    for (int i=0;i<21;i++)
    {
      d_probeVars[i].resize(21);
      for (int j=0;j<21;j++)
        d_probeVars[i][j]=0.0;
    }
    staticContributions.resize(14+0);
    d_staticContributions.resize(14+0);
    for (int i=0;i<14+0;i++)
      d_staticContributions[i].resize(21);
    dynamicContributions.resize(14+0);
    d_dynamicContributions.resize(14+0);
    for (int i=0;i<14+0;i++)
      d_dynamicContributions[i].resize(21);
    probeDiffs.resize(21,0.0);
    Jdxp_static.resize(14+0);
    Jdxp_dynamic.resize(14+0);
  }

    noiseContribsPower.resize(15);
    noiseContribsExponent.resize(15);

  // initialize contributions to zero (automatically sets derivatives to zero)
  for (int i=0; i < 14+0 ; ++i)
  {
     staticContributions[i]=0;
     for (int j=0;j<21;j++)
        d_staticContributions[i][j] = 0.0;
     dynamicContributions[i]=0;
     for (int j=0;j<21;j++)
        d_dynamicContributions[i][j] = 0.0;
     Jdxp_static[i]=0;
     Jdxp_dynamic[i]=0;
  }

  for (int i=0; i < 21 ; ++i)
  {
    probeDiffs[i] = 0.0;
  }
  // extract solution variables and set as Fad independent variables.
probeVars[admsProbeID_V_xf2_GND] = (*solVectorPtr)[li_xf2];
d_probeVars[admsProbeID_V_xf2_GND][admsProbeID_V_xf2_GND] = 1.0;
probeVars[admsProbeID_V_xf1_GND] = (*solVectorPtr)[li_xf1];
d_probeVars[admsProbeID_V_xf1_GND][admsProbeID_V_xf1_GND] = 1.0;
probeVars[admsProbeID_V_s_si] = (*solVectorPtr)[li_s] - (*solVectorPtr)[li_si];
d_probeVars[admsProbeID_V_s_si][admsProbeID_V_s_si] = 1.0;
probeVars[admsProbeID_V_bx_si] = (*solVectorPtr)[li_bx] - (*solVectorPtr)[li_si];
d_probeVars[admsProbeID_V_bx_si][admsProbeID_V_bx_si] = 1.0;
probeVars[admsProbeID_V_si_bp] = (*solVectorPtr)[li_si] - (*solVectorPtr)[li_bp];
d_probeVars[admsProbeID_V_si_bp][admsProbeID_V_si_bp] = 1.0;
probeVars[admsProbeID_V_bp_cx] = (*solVectorPtr)[li_bp] - (*solVectorPtr)[li_cx];
d_probeVars[admsProbeID_V_bp_cx][admsProbeID_V_bp_cx] = 1.0;
probeVars[admsProbeID_V_e_ei] = (*solVectorPtr)[li_e] - (*solVectorPtr)[li_ei];
d_probeVars[admsProbeID_V_e_ei][admsProbeID_V_e_ei] = 1.0;
probeVars[admsProbeID_V_bx_bi] = (*solVectorPtr)[li_bx] - (*solVectorPtr)[li_bi];
d_probeVars[admsProbeID_V_bx_bi][admsProbeID_V_bx_bi] = 1.0;
probeVars[admsProbeID_V_b_bx] = (*solVectorPtr)[li_b] - (*solVectorPtr)[li_bx];
d_probeVars[admsProbeID_V_b_bx][admsProbeID_V_b_bx] = 1.0;
probeVars[admsProbeID_V_cx_ci] = (*solVectorPtr)[li_cx] - (*solVectorPtr)[li_ci];
d_probeVars[admsProbeID_V_cx_ci][admsProbeID_V_cx_ci] = 1.0;
probeVars[admsProbeID_V_c_cx] = (*solVectorPtr)[li_c] - (*solVectorPtr)[li_cx];
d_probeVars[admsProbeID_V_c_cx][admsProbeID_V_c_cx] = 1.0;
probeVars[admsProbeID_V_b_c] = (*solVectorPtr)[li_b] - (*solVectorPtr)[li_c];
d_probeVars[admsProbeID_V_b_c][admsProbeID_V_b_c] = 1.0;
probeVars[admsProbeID_V_b_e] = (*solVectorPtr)[li_b] - (*solVectorPtr)[li_e];
d_probeVars[admsProbeID_V_b_e][admsProbeID_V_b_e] = 1.0;
probeVars[admsProbeID_V_bx_bp] = (*solVectorPtr)[li_bx] - (*solVectorPtr)[li_bp];
d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp] = 1.0;
probeVars[admsProbeID_V_ci_ei] = (*solVectorPtr)[li_ci] - (*solVectorPtr)[li_ei];
d_probeVars[admsProbeID_V_ci_ei][admsProbeID_V_ci_ei] = 1.0;
probeVars[admsProbeID_V_bx_cx] = (*solVectorPtr)[li_bx] - (*solVectorPtr)[li_cx];
d_probeVars[admsProbeID_V_bx_cx][admsProbeID_V_bx_cx] = 1.0;
probeVars[admsProbeID_V_bi_cx] = (*solVectorPtr)[li_bi] - (*solVectorPtr)[li_cx];
d_probeVars[admsProbeID_V_bi_cx][admsProbeID_V_bi_cx] = 1.0;
probeVars[admsProbeID_V_bi_ci] = (*solVectorPtr)[li_bi] - (*solVectorPtr)[li_ci];
d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci] = 1.0;
probeVars[admsProbeID_V_bx_ei] = (*solVectorPtr)[li_bx] - (*solVectorPtr)[li_ei];
d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei] = 1.0;
probeVars[admsProbeID_V_bi_ei] = (*solVectorPtr)[li_bi] - (*solVectorPtr)[li_ei];
d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei] = 1.0;
probeVars[admsProbeID_Temp_dt_GND] = (*solVectorPtr)[li_dt];
d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND] = 1.0;


    // pre-multiply any "typed" probes (i.e. those limited with "typedpnjlim")
probeVars[admsProbeID_V_bx_bp] *= (model_.VBICtype);
d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp] *= (model_.VBICtype);
probeVars[admsProbeID_V_bx_cx] *= (model_.VBICtype);
d_probeVars[admsProbeID_V_bx_cx][admsProbeID_V_bx_cx] *= (model_.VBICtype);
probeVars[admsProbeID_V_bi_cx] *= (model_.VBICtype);
d_probeVars[admsProbeID_V_bi_cx][admsProbeID_V_bi_cx] *= (model_.VBICtype);
probeVars[admsProbeID_V_bi_ci] *= (model_.VBICtype);
d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci] *= (model_.VBICtype);
probeVars[admsProbeID_V_bx_ei] *= (model_.VBICtype);
d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei] *= (model_.VBICtype);
probeVars[admsProbeID_V_bi_ei] *= (model_.VBICtype);
d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei] *= (model_.VBICtype);

// Copy probes into limiting vars

  Vbe_orig = Vbe_limited = probeVars[admsProbeID_V_b_e];
  probeDiffs[admsProbeID_V_b_e] = 0.0;
  Vbep_orig = Vbep_limited = probeVars[admsProbeID_V_bx_bp];
  probeDiffs[admsProbeID_V_bx_bp] = 0.0;
  Vbxcx_orig = Vbxcx_limited = probeVars[admsProbeID_V_bx_cx];
  probeDiffs[admsProbeID_V_bx_cx] = 0.0;
  Vbcx_orig = Vbcx_limited = probeVars[admsProbeID_V_bi_cx];
  probeDiffs[admsProbeID_V_bi_cx] = 0.0;
  Vbci_orig = Vbci_limited = probeVars[admsProbeID_V_bi_ci];
  probeDiffs[admsProbeID_V_bi_ci] = 0.0;
  Vbex_orig = Vbex_limited = probeVars[admsProbeID_V_bx_ei];
  probeDiffs[admsProbeID_V_bx_ei] = 0.0;
  Vbei_orig = Vbei_limited = probeVars[admsProbeID_V_bi_ei];
  probeDiffs[admsProbeID_V_bi_ei] = 0.0;
  dt_et_orig = dt_et_limited = probeVars[admsProbeID_Temp_dt_GND];
  probeDiffs[admsProbeID_Temp_dt_GND] = 0.0;

  origFlag = true;

  if (getSolverState().newtonIter == 0)
  {

    if (!(getSolverState().dcopFlag)||(getSolverState().locaEnabledFlag && getSolverState().dcopFlag))
    {
       Vbe_old = ((*extData.currStoVectorPtr))[li_store_admsProbeID_V_b_e];
       Vbep_old = ((*extData.currStoVectorPtr))[li_store_admsProbeID_V_bx_bp];
       Vbxcx_old = ((*extData.currStoVectorPtr))[li_store_admsProbeID_V_bx_cx];
       Vbcx_old = ((*extData.currStoVectorPtr))[li_store_admsProbeID_V_bi_cx];
       Vbci_old = ((*extData.currStoVectorPtr))[li_store_admsProbeID_V_bi_ci];
       Vbex_old = ((*extData.currStoVectorPtr))[li_store_admsProbeID_V_bx_ei];
       Vbei_old = ((*extData.currStoVectorPtr))[li_store_admsProbeID_V_bi_ei];
       dt_et_old = ((*extData.currStoVectorPtr))[li_store_admsProbeID_Temp_dt_GND];
    }
    else
    {
       Vbe_old = Vbe_limited;
       Vbep_old = Vbep_limited;
       Vbxcx_old = Vbxcx_limited;
       Vbcx_old = Vbcx_limited;
       Vbci_old = Vbci_limited;
       Vbex_old = Vbex_limited;
       Vbei_old = Vbei_limited;
       dt_et_old = dt_et_limited;
    }
  }
  else
  {
     Vbe_old = ((*extData.nextStoVectorPtr))[li_store_admsProbeID_V_b_e];
     Vbep_old = ((*extData.nextStoVectorPtr))[li_store_admsProbeID_V_bx_bp];
     Vbxcx_old = ((*extData.nextStoVectorPtr))[li_store_admsProbeID_V_bx_cx];
     Vbcx_old = ((*extData.nextStoVectorPtr))[li_store_admsProbeID_V_bi_cx];
     Vbci_old = ((*extData.nextStoVectorPtr))[li_store_admsProbeID_V_bi_ci];
     Vbex_old = ((*extData.nextStoVectorPtr))[li_store_admsProbeID_V_bx_ei];
     Vbei_old = ((*extData.nextStoVectorPtr))[li_store_admsProbeID_V_bi_ei];
     dt_et_old = ((*extData.nextStoVectorPtr))[li_store_admsProbeID_Temp_dt_GND];
}
// -- code converted from analog/code block

// Manually inserted code for voltage drop initialization
if (getSolverState().newtonIter == 0 && getSolverState().initJctFlag_ && getDeviceOptions().voltageLimiterFlag)
{
  Vbci_limited = Vbcx_limited = Vbxcx_limited = Vbep_limited = 0;
  Vbe_limited = Vbei_limited = Vbex_limited = tVCrit;
  dt_et_limited = 0;
  origFlag = false;
}

//Begin block evaluateStatic
{


//dt_et = ($limit(Temp(dt,GND),"limRTH"));
if (getDeviceOptions().voltageLimiterFlag)
{
  int icheck=0;
  dt_et_limited = AnalogFunctions::limRTH(dt_et_limited,dt_et_old);
if (dt_et_limited != dt_et_orig)
{
icheck=1;
}
  if (icheck == 1)
     origFlag = false;
  if (!origFlag)
  {
    probeDiffs[admsProbeID_Temp_dt_GND] = dt_et_limited - dt_et_orig;
    probeVars[admsProbeID_Temp_dt_GND] += probeDiffs[admsProbeID_Temp_dt_GND];
  }
}
dt_et = probeVars[admsProbeID_Temp_dt_GND];

d_dt_et_dTemp_dt_GND = d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];


d_tdevC_dTemp_dt_GND = d_dt_et_dTemp_dt_GND;
tdevC = (((admsTemperature+trise)+dt_et)-273.15);
if ((tdevC<((model_.tminclip)+1.0)))
{
{
double value_exp_0 = exp(((tdevC-(model_.tminclip))-1.0));
double  deriv_exp_0_d0 = value_exp_0;

d_tdevC_dTemp_dt_GND = (deriv_exp_0_d0*(d_tdevC_dTemp_dt_GND));
tdevC = ((model_.tminclip)+value_exp_0);
}
}
else
{
if ((tdevC>((model_.tmaxclip)-1.0)))
{
{
double value_exp_0 = exp((((model_.tmaxclip)-tdevC)-1.0));
double  deriv_exp_0_d0 = value_exp_0;

d_tdevC_dTemp_dt_GND = (-(deriv_exp_0_d0*((-d_tdevC_dTemp_dt_GND))));
tdevC = ((model_.tmaxclip)-value_exp_0);
}
}
else
{

}
}

d_tdevK_dTemp_dt_GND = d_tdevC_dTemp_dt_GND;
tdevK = (tdevC+273.15);

d_vtv_dTemp_dt_GND = (1.380662e-23*d_tdevK_dTemp_dt_GND/1.602189e-19);
vtv = ((1.380662e-23*tdevK)/1.602189e-19);

d_rT_dTemp_dt_GND = (d_tdevK_dTemp_dt_GND/(model_.tiniK));
rT = (tdevK/(model_.tiniK));

d_dT_dTemp_dt_GND = d_tdevK_dTemp_dt_GND;
dT = (tdevK-(model_.tiniK));
{
double value_pow_0 = pow(rT,(model_.xikf));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xikf)/rT));

d_ikf_t_dTemp_dt_GND = (model_.ikf)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
ikf_t = ((model_.ikf)*value_pow_0);
}
if ((model_.given("xrcx")))
{
{
double value_pow_0 = pow(rT,(model_.xrcx));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xrcx)/rT));

d_rcx_t_dTemp_dt_GND = (model_.rcx)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
rcx_t = ((model_.rcx)*value_pow_0);
}
}
else
{
{
double value_pow_0 = pow(rT,(model_.xrc));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xrc)/rT));

d_rcx_t_dTemp_dt_GND = (model_.rcx)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
rcx_t = ((model_.rcx)*value_pow_0);
}
}
if ((model_.given("xrci")))
{
{
double value_pow_0 = pow(rT,(model_.xrci));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xrci)/rT));

d_rci_t_dTemp_dt_GND = (model_.rci)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
rci_t = ((model_.rci)*value_pow_0);
}
}
else
{
{
double value_pow_0 = pow(rT,(model_.xrc));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xrc)/rT));

d_rci_t_dTemp_dt_GND = (model_.rci)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
rci_t = ((model_.rci)*value_pow_0);
}
}
if ((model_.given("xrbx")))
{
{
double value_pow_0 = pow(rT,(model_.xrbx));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xrbx)/rT));

d_rbx_t_dTemp_dt_GND = (model_.rbx)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
rbx_t = ((model_.rbx)*value_pow_0);
}
}
else
{
{
double value_pow_0 = pow(rT,(model_.xrb));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xrb)/rT));

d_rbx_t_dTemp_dt_GND = (model_.rbx)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
rbx_t = ((model_.rbx)*value_pow_0);
}
}
if ((model_.given("xrbi")))
{
{
double value_pow_0 = pow(rT,(model_.xrbi));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xrbi)/rT));

d_rbi_t_dTemp_dt_GND = (model_.rbi)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
rbi_t = ((model_.rbi)*value_pow_0);
}
}
else
{
{
double value_pow_0 = pow(rT,(model_.xrb));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xrb)/rT));

d_rbi_t_dTemp_dt_GND = (model_.rbi)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
rbi_t = ((model_.rbi)*value_pow_0);
}
}
{
double value_pow_0 = pow(rT,(model_.xre));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xre)/rT));

d_re_t_dTemp_dt_GND = (model_.re)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
re_t = ((model_.re)*value_pow_0);
}
{
double value_pow_0 = pow(rT,(model_.xrs));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xrs)/rT));

d_rs_t_dTemp_dt_GND = (model_.rs)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
rs_t = ((model_.rs)*value_pow_0);
}
if ((model_.given("xrbp")))
{
{
double value_pow_0 = pow(rT,(model_.xrbp));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xrbp)/rT));

d_rbp_t_dTemp_dt_GND = (model_.rbp)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
rbp_t = ((model_.rbp)*value_pow_0);
}
}
else
{
{
double value_pow_0 = pow(rT,(model_.xrc));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xrc)/rT));

d_rbp_t_dTemp_dt_GND = (model_.rbp)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
rbp_t = ((model_.rbp)*value_pow_0);
}
}

d_rth_t_dTemp_dt_GND = (model_.rth)*d_dT_dTemp_dt_GND*(model_.tcrth);
rth_t = ((model_.rth)*(1.0+(dT*(model_.tcrth))));
{
double value_pow_0 = pow(rT,((model_.xis)/(model_.nf)));
double value_exp_1 = exp((((-(model_.ea))*(1.0-rT))/(vtv*(model_.nf))));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*((model_.xis)/(model_.nf))/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_is_t_dTemp_dt_GND = (((model_.is)*value_pow_0)*(deriv_exp_1_d0*((((vtv*(model_.nf))*(-(model_.ea))*(-d_rT_dTemp_dt_GND)-((-(model_.ea))*(1.0-rT))*d_vtv_dTemp_dt_GND*(model_.nf))/(vtv*(model_.nf))/(vtv*(model_.nf)))))+(model_.is)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
is_t = (((model_.is)*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(rT,((model_.xisr)/(model_.nr)));
double value_exp_1 = exp((((-(model_.dear))*(1.0-rT))/(vtv*(model_.nr))));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*((model_.xisr)/(model_.nr))/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_isrr_t_dTemp_dt_GND = (((model_.isrr)*value_pow_0)*(deriv_exp_1_d0*((((vtv*(model_.nr))*(-(model_.dear))*(-d_rT_dTemp_dt_GND)-((-(model_.dear))*(1.0-rT))*d_vtv_dTemp_dt_GND*(model_.nr))/(vtv*(model_.nr))/(vtv*(model_.nr)))))+(model_.isrr)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
isrr_t = (((model_.isrr)*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(rT,((model_.xis)/(model_.nfp)));
double value_exp_1 = exp((((-(model_.eap))*(1.0-rT))/(vtv*(model_.nfp))));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*((model_.xis)/(model_.nfp))/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_isp_t_dTemp_dt_GND = (((model_.isp)*value_pow_0)*(deriv_exp_1_d0*((((vtv*(model_.nfp))*(-(model_.eap))*(-d_rT_dTemp_dt_GND)-((-(model_.eap))*(1.0-rT))*d_vtv_dTemp_dt_GND*(model_.nfp))/(vtv*(model_.nfp))/(vtv*(model_.nfp)))))+(model_.isp)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
isp_t = (((model_.isp)*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(rT,((model_.xii)/(model_.nei)));
double value_exp_1 = exp((((-(model_.eaie))*(1.0-rT))/(vtv*(model_.nei))));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*((model_.xii)/(model_.nei))/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_ibei_t_dTemp_dt_GND = (((model_.ibei)*value_pow_0)*(deriv_exp_1_d0*((((vtv*(model_.nei))*(-(model_.eaie))*(-d_rT_dTemp_dt_GND)-((-(model_.eaie))*(1.0-rT))*d_vtv_dTemp_dt_GND*(model_.nei))/(vtv*(model_.nei))/(vtv*(model_.nei)))))+(model_.ibei)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
ibei_t = (((model_.ibei)*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(rT,((model_.xin)/(model_.nen)));
double value_exp_1 = exp((((-(model_.eane))*(1.0-rT))/(vtv*(model_.nen))));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*((model_.xin)/(model_.nen))/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_iben_t_dTemp_dt_GND = (((model_.iben)*value_pow_0)*(deriv_exp_1_d0*((((vtv*(model_.nen))*(-(model_.eane))*(-d_rT_dTemp_dt_GND)-((-(model_.eane))*(1.0-rT))*d_vtv_dTemp_dt_GND*(model_.nen))/(vtv*(model_.nen))/(vtv*(model_.nen)))))+(model_.iben)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
iben_t = (((model_.iben)*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(rT,((model_.xii)/(model_.nci)));
double value_exp_1 = exp((((-(model_.eaic))*(1.0-rT))/(vtv*(model_.nci))));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*((model_.xii)/(model_.nci))/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_ibci_t_dTemp_dt_GND = (((model_.ibci)*value_pow_0)*(deriv_exp_1_d0*((((vtv*(model_.nci))*(-(model_.eaic))*(-d_rT_dTemp_dt_GND)-((-(model_.eaic))*(1.0-rT))*d_vtv_dTemp_dt_GND*(model_.nci))/(vtv*(model_.nci))/(vtv*(model_.nci)))))+(model_.ibci)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
ibci_t = (((model_.ibci)*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(rT,((model_.xin)/(model_.ncn)));
double value_exp_1 = exp((((-(model_.eanc))*(1.0-rT))/(vtv*(model_.ncn))));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*((model_.xin)/(model_.ncn))/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_ibcn_t_dTemp_dt_GND = (((model_.ibcn)*value_pow_0)*(deriv_exp_1_d0*((((vtv*(model_.ncn))*(-(model_.eanc))*(-d_rT_dTemp_dt_GND)-((-(model_.eanc))*(1.0-rT))*d_vtv_dTemp_dt_GND*(model_.ncn))/(vtv*(model_.ncn))/(vtv*(model_.ncn)))))+(model_.ibcn)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
ibcn_t = (((model_.ibcn)*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(rT,((model_.xii)/(model_.nci)));
double value_exp_1 = exp((((-(model_.eaic))*(1.0-rT))/(vtv*(model_.nci))));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*((model_.xii)/(model_.nci))/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_ibeip_t_dTemp_dt_GND = (((model_.ibeip)*value_pow_0)*(deriv_exp_1_d0*((((vtv*(model_.nci))*(-(model_.eaic))*(-d_rT_dTemp_dt_GND)-((-(model_.eaic))*(1.0-rT))*d_vtv_dTemp_dt_GND*(model_.nci))/(vtv*(model_.nci))/(vtv*(model_.nci)))))+(model_.ibeip)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
ibeip_t = (((model_.ibeip)*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(rT,((model_.xin)/(model_.ncn)));
double value_exp_1 = exp((((-(model_.eanc))*(1.0-rT))/(vtv*(model_.ncn))));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*((model_.xin)/(model_.ncn))/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_ibenp_t_dTemp_dt_GND = (((model_.ibenp)*value_pow_0)*(deriv_exp_1_d0*((((vtv*(model_.ncn))*(-(model_.eanc))*(-d_rT_dTemp_dt_GND)-((-(model_.eanc))*(1.0-rT))*d_vtv_dTemp_dt_GND*(model_.ncn))/(vtv*(model_.ncn))/(vtv*(model_.ncn)))))+(model_.ibenp)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
ibenp_t = (((model_.ibenp)*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(rT,((model_.xii)/(model_.ncip)));
double value_exp_1 = exp((((-(model_.eais))*(1.0-rT))/(vtv*(model_.ncip))));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*((model_.xii)/(model_.ncip))/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_ibcip_t_dTemp_dt_GND = (((model_.ibcip)*value_pow_0)*(deriv_exp_1_d0*((((vtv*(model_.ncip))*(-(model_.eais))*(-d_rT_dTemp_dt_GND)-((-(model_.eais))*(1.0-rT))*d_vtv_dTemp_dt_GND*(model_.ncip))/(vtv*(model_.ncip))/(vtv*(model_.ncip)))))+(model_.ibcip)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
ibcip_t = (((model_.ibcip)*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(rT,((model_.xin)/(model_.ncnp)));
double value_exp_1 = exp((((-(model_.eans))*(1.0-rT))/(vtv*(model_.ncnp))));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*((model_.xin)/(model_.ncnp))/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_ibcnp_t_dTemp_dt_GND = (((model_.ibcnp)*value_pow_0)*(deriv_exp_1_d0*((((vtv*(model_.ncnp))*(-(model_.eans))*(-d_rT_dTemp_dt_GND)-((-(model_.eans))*(1.0-rT))*d_vtv_dTemp_dt_GND*(model_.ncnp))/(vtv*(model_.ncnp))/(vtv*(model_.ncnp)))))+(model_.ibcnp)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
ibcnp_t = (((model_.ibcnp)*value_pow_0)*value_exp_1);
}

d_nf_t_dTemp_dt_GND = (model_.nf)*d_dT_dTemp_dt_GND*(model_.tnf);
nf_t = ((model_.nf)*(1.0+(dT*(model_.tnf))));

d_nr_t_dTemp_dt_GND = (model_.nr)*d_dT_dTemp_dt_GND*(model_.tnf);
nr_t = ((model_.nr)*(1.0+(dT*(model_.tnf))));

d_avc2_t_dTemp_dt_GND = (model_.avc2)*d_dT_dTemp_dt_GND*(model_.tavc);
avc2_t = ((model_.avc2)*(1.0+(dT*(model_.tavc))));

d_avcx2_t_dTemp_dt_GND = (model_.avcx2)*d_dT_dTemp_dt_GND*(model_.tavcx);
avcx2_t = ((model_.avcx2)*(1.0+(dT*(model_.tavcx))));

d_vbbe_t_dTemp_dt_GND = (model_.vbbe)*(dT*d_dT_dTemp_dt_GND*(model_.tvbbe2)+d_dT_dTemp_dt_GND*((model_.tvbbe1)+(dT*(model_.tvbbe2))));
vbbe_t = ((model_.vbbe)*(1.0+(dT*((model_.tvbbe1)+(dT*(model_.tvbbe2))))));

d_nbbe_t_dTemp_dt_GND = (model_.nbbe)*d_dT_dTemp_dt_GND*(model_.tnbbe);
nbbe_t = ((model_.nbbe)*(1.0+(dT*(model_.tnbbe))));
//Begin block pePsibiBlock
{
//Block-local variables for block pePsibiBlock
double psiio=0.0;
     double d_psiio_dTemp_dt_GND=0.0;
double psiin=0.0;
     double d_psiin_dTemp_dt_GND=0.0;
//End of Block-local variables
{
double value_exp_0 = exp((((0.5*(model_.pe))*rT)/vtv));
double value_exp_1 = exp(((((-0.5)*(model_.pe))*rT)/vtv));
double value_log_2 = log((value_exp_0-value_exp_1));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_exp_1_d0 = value_exp_1;
double  deriv_log_2_d0 = (1.0/(value_exp_0-value_exp_1));

d_psiio_dTemp_dt_GND = ((2.0*(vtv/rT))*(deriv_log_2_d0*(((deriv_exp_0_d0*(((vtv*(0.5*(model_.pe))*d_rT_dTemp_dt_GND-((0.5*(model_.pe))*rT)*d_vtv_dTemp_dt_GND)/vtv/vtv)))-(deriv_exp_1_d0*(((vtv*((-0.5)*(model_.pe))*d_rT_dTemp_dt_GND-(((-0.5)*(model_.pe))*rT)*d_vtv_dTemp_dt_GND)/vtv/vtv))))))+2.0*((rT*d_vtv_dTemp_dt_GND-vtv*d_rT_dTemp_dt_GND)/rT/rT)*value_log_2);
psiio = ((2.0*(vtv/rT))*value_log_2);
}
{
double value_log_0 = log(rT);
double  deriv_log_0_d0 = (1.0/rT);

d_psiin_dTemp_dt_GND = (((psiio*d_rT_dTemp_dt_GND+d_psiio_dTemp_dt_GND*rT)-((3.0*vtv)*(deriv_log_0_d0*(d_rT_dTemp_dt_GND))+3.0*d_vtv_dTemp_dt_GND*value_log_0))-(model_.eaie)*d_rT_dTemp_dt_GND);
psiin = (((psiio*rT)-((3.0*vtv)*value_log_0))-((model_.eaie)*(rT-1.0)));
}
{
double value_exp_0 = exp(((-psiin)/vtv));
double value_sqrt_1 = sqrt((1.0+(4.0*value_exp_0)));
double value_log_2 = log((0.5*(1.0+value_sqrt_1)));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);
double  deriv_log_2_d0 = (1.0/(0.5*(1.0+value_sqrt_1)));

d_pe_t_dTemp_dt_GND = (d_psiin_dTemp_dt_GND+((2.0*vtv)*(deriv_log_2_d0*(0.5*(deriv_sqrt_1_d0*(4.0*(deriv_exp_0_d0*(((vtv*(-d_psiin_dTemp_dt_GND)-(-psiin)*d_vtv_dTemp_dt_GND)/vtv/vtv)))))))+2.0*d_vtv_dTemp_dt_GND*value_log_2));
pe_t = (psiin+((2.0*vtv)*value_log_2));
}
}
// End block pePsibiBlock
//Begin block pcPsibiBlock
{
//Block-local variables for block pcPsibiBlock
double psiio=0.0;
     double d_psiio_dTemp_dt_GND=0.0;
double psiin=0.0;
     double d_psiin_dTemp_dt_GND=0.0;
//End of Block-local variables
{
double value_exp_0 = exp((((0.5*(model_.pc))*rT)/vtv));
double value_exp_1 = exp(((((-0.5)*(model_.pc))*rT)/vtv));
double value_log_2 = log((value_exp_0-value_exp_1));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_exp_1_d0 = value_exp_1;
double  deriv_log_2_d0 = (1.0/(value_exp_0-value_exp_1));

d_psiio_dTemp_dt_GND = ((2.0*(vtv/rT))*(deriv_log_2_d0*(((deriv_exp_0_d0*(((vtv*(0.5*(model_.pc))*d_rT_dTemp_dt_GND-((0.5*(model_.pc))*rT)*d_vtv_dTemp_dt_GND)/vtv/vtv)))-(deriv_exp_1_d0*(((vtv*((-0.5)*(model_.pc))*d_rT_dTemp_dt_GND-(((-0.5)*(model_.pc))*rT)*d_vtv_dTemp_dt_GND)/vtv/vtv))))))+2.0*((rT*d_vtv_dTemp_dt_GND-vtv*d_rT_dTemp_dt_GND)/rT/rT)*value_log_2);
psiio = ((2.0*(vtv/rT))*value_log_2);
}
{
double value_log_0 = log(rT);
double  deriv_log_0_d0 = (1.0/rT);

d_psiin_dTemp_dt_GND = (((psiio*d_rT_dTemp_dt_GND+d_psiio_dTemp_dt_GND*rT)-((3.0*vtv)*(deriv_log_0_d0*(d_rT_dTemp_dt_GND))+3.0*d_vtv_dTemp_dt_GND*value_log_0))-(model_.eaic)*d_rT_dTemp_dt_GND);
psiin = (((psiio*rT)-((3.0*vtv)*value_log_0))-((model_.eaic)*(rT-1.0)));
}
{
double value_exp_0 = exp(((-psiin)/vtv));
double value_sqrt_1 = sqrt((1.0+(4.0*value_exp_0)));
double value_log_2 = log((0.5*(1.0+value_sqrt_1)));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);
double  deriv_log_2_d0 = (1.0/(0.5*(1.0+value_sqrt_1)));

d_pc_t_dTemp_dt_GND = (d_psiin_dTemp_dt_GND+((2.0*vtv)*(deriv_log_2_d0*(0.5*(deriv_sqrt_1_d0*(4.0*(deriv_exp_0_d0*(((vtv*(-d_psiin_dTemp_dt_GND)-(-psiin)*d_vtv_dTemp_dt_GND)/vtv/vtv)))))))+2.0*d_vtv_dTemp_dt_GND*value_log_2));
pc_t = (psiin+((2.0*vtv)*value_log_2));
}
}
// End block pcPsibiBlock
//Begin block psPsibiBlock
{
//Block-local variables for block psPsibiBlock
double psiio=0.0;
     double d_psiio_dTemp_dt_GND=0.0;
double psiin=0.0;
     double d_psiin_dTemp_dt_GND=0.0;
//End of Block-local variables
{
double value_exp_0 = exp((((0.5*(model_.ps))*rT)/vtv));
double value_exp_1 = exp(((((-0.5)*(model_.ps))*rT)/vtv));
double value_log_2 = log((value_exp_0-value_exp_1));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_exp_1_d0 = value_exp_1;
double  deriv_log_2_d0 = (1.0/(value_exp_0-value_exp_1));

d_psiio_dTemp_dt_GND = ((2.0*(vtv/rT))*(deriv_log_2_d0*(((deriv_exp_0_d0*(((vtv*(0.5*(model_.ps))*d_rT_dTemp_dt_GND-((0.5*(model_.ps))*rT)*d_vtv_dTemp_dt_GND)/vtv/vtv)))-(deriv_exp_1_d0*(((vtv*((-0.5)*(model_.ps))*d_rT_dTemp_dt_GND-(((-0.5)*(model_.ps))*rT)*d_vtv_dTemp_dt_GND)/vtv/vtv))))))+2.0*((rT*d_vtv_dTemp_dt_GND-vtv*d_rT_dTemp_dt_GND)/rT/rT)*value_log_2);
psiio = ((2.0*(vtv/rT))*value_log_2);
}
{
double value_log_0 = log(rT);
double  deriv_log_0_d0 = (1.0/rT);

d_psiin_dTemp_dt_GND = (((psiio*d_rT_dTemp_dt_GND+d_psiio_dTemp_dt_GND*rT)-((3.0*vtv)*(deriv_log_0_d0*(d_rT_dTemp_dt_GND))+3.0*d_vtv_dTemp_dt_GND*value_log_0))-(model_.eais)*d_rT_dTemp_dt_GND);
psiin = (((psiio*rT)-((3.0*vtv)*value_log_0))-((model_.eais)*(rT-1.0)));
}
{
double value_exp_0 = exp(((-psiin)/vtv));
double value_sqrt_1 = sqrt((1.0+(4.0*value_exp_0)));
double value_log_2 = log((0.5*(1.0+value_sqrt_1)));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);
double  deriv_log_2_d0 = (1.0/(0.5*(1.0+value_sqrt_1)));

d_ps_t_dTemp_dt_GND = (d_psiin_dTemp_dt_GND+((2.0*vtv)*(deriv_log_2_d0*(0.5*(deriv_sqrt_1_d0*(4.0*(deriv_exp_0_d0*(((vtv*(-d_psiin_dTemp_dt_GND)-(-psiin)*d_vtv_dTemp_dt_GND)/vtv/vtv)))))))+2.0*d_vtv_dTemp_dt_GND*value_log_2));
ps_t = (psiin+((2.0*vtv)*value_log_2));
}
}
// End block psPsibiBlock
{
double value_pow_0 = pow(((model_.pe)/pe_t),(model_.me));
double  deriv_pow_0_d0 = ((((model_.pe)/pe_t) == 0.0)?0.0:(value_pow_0*(model_.me)/((model_.pe)/pe_t)));

d_cje_t_dTemp_dt_GND = (model_.cje)*(deriv_pow_0_d0*((-(model_.pe)*d_pe_t_dTemp_dt_GND/pe_t/pe_t)));
cje_t = ((model_.cje)*value_pow_0);
}
{
double value_pow_0 = pow(((model_.pc)/pc_t),(model_.mc));
double  deriv_pow_0_d0 = ((((model_.pc)/pc_t) == 0.0)?0.0:(value_pow_0*(model_.mc)/((model_.pc)/pc_t)));

d_cjc_t_dTemp_dt_GND = (model_.cjc)*(deriv_pow_0_d0*((-(model_.pc)*d_pc_t_dTemp_dt_GND/pc_t/pc_t)));
cjc_t = ((model_.cjc)*value_pow_0);
}
{
double value_pow_0 = pow(((model_.pc)/pc_t),(model_.mc));
double  deriv_pow_0_d0 = ((((model_.pc)/pc_t) == 0.0)?0.0:(value_pow_0*(model_.mc)/((model_.pc)/pc_t)));

d_cjep_t_dTemp_dt_GND = (model_.cjep)*(deriv_pow_0_d0*((-(model_.pc)*d_pc_t_dTemp_dt_GND/pc_t/pc_t)));
cjep_t = ((model_.cjep)*value_pow_0);
}
{
double value_pow_0 = pow(((model_.ps)/ps_t),(model_.ms));
double  deriv_pow_0_d0 = ((((model_.ps)/ps_t) == 0.0)?0.0:(value_pow_0*(model_.ms)/((model_.ps)/ps_t)));

d_cjcp_t_dTemp_dt_GND = (model_.cjcp)*(deriv_pow_0_d0*((-(model_.ps)*d_ps_t_dTemp_dt_GND/ps_t/ps_t)));
cjcp_t = ((model_.cjcp)*value_pow_0);
}
{
double value_pow_0 = pow(rT,(model_.xis));
double value_exp_1 = exp((((-(model_.ea))*(1.0-rT))/vtv));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xis)/rT));
double  deriv_exp_1_d0 = value_exp_1;

d_gamm_t_dTemp_dt_GND = (((model_.gamm)*value_pow_0)*(deriv_exp_1_d0*(((vtv*(-(model_.ea))*(-d_rT_dTemp_dt_GND)-((-(model_.ea))*(1.0-rT))*d_vtv_dTemp_dt_GND)/vtv/vtv)))+(model_.gamm)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND))*value_exp_1);
gamm_t = (((model_.gamm)*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(rT,(model_.xvo));
double  deriv_pow_0_d0 = ((rT == 0.0)?0.0:(value_pow_0*(model_.xvo)/rT));

d_vo_t_dTemp_dt_GND = (model_.vo)*(deriv_pow_0_d0*(d_rT_dTemp_dt_GND));
vo_t = ((model_.vo)*value_pow_0);
}
{
double value_exp_0 = exp(((-vbbe_t)/(nbbe_t*vtv)));
double  deriv_exp_0_d0 = value_exp_0;

d_ebbe_t_dTemp_dt_GND = (deriv_exp_0_d0*((((nbbe_t*vtv)*(-d_vbbe_t_dTemp_dt_GND)-(-vbbe_t)*(nbbe_t*d_vtv_dTemp_dt_GND+d_nbbe_t_dTemp_dt_GND*vtv))/(nbbe_t*vtv)/(nbbe_t*vtv))));
ebbe_t = value_exp_0;
}

d_vef_t_dTemp_dt_GND = (model_.vef)*d_dT_dTemp_dt_GND*(model_.tcvef);
vef_t = ((model_.vef)*(1.0+(dT*(model_.tcvef))));

d_ver_t_dTemp_dt_GND = (model_.ver)*d_dT_dTemp_dt_GND*(model_.tcver);
ver_t = ((model_.ver)*(1.0+(dT*(model_.tcver))));

d_Gcx_dTemp_dt_GND = ((rcx_t>1.0e-3)?(-d_rcx_t_dTemp_dt_GND/rcx_t/rcx_t):0.0);
Gcx = ((rcx_t>1.0e-3)?(1.0/rcx_t):1.0e3);

d_Gci_dTemp_dt_GND = ((rci_t>1.0e-3)?(-d_rci_t_dTemp_dt_GND/rci_t/rci_t):0.0);
Gci = ((rci_t>1.0e-3)?(1.0/rci_t):1.0e3);

d_Gbx_dTemp_dt_GND = ((rbx_t>1.0e-3)?(-d_rbx_t_dTemp_dt_GND/rbx_t/rbx_t):0.0);
Gbx = ((rbx_t>1.0e-3)?(1.0/rbx_t):1.0e3);

d_Gbi_dTemp_dt_GND = ((rbi_t>1.0e-3)?(-d_rbi_t_dTemp_dt_GND/rbi_t/rbi_t):0.0);
Gbi = ((rbi_t>1.0e-3)?(1.0/rbi_t):1.0e3);

d_Ge_dTemp_dt_GND = ((re_t>1.0e-3)?(-d_re_t_dTemp_dt_GND/re_t/re_t):0.0);
Ge = ((re_t>1.0e-3)?(1.0/re_t):1.0e3);

d_Gbp_dTemp_dt_GND = ((rbp_t>1.0e-3)?(-d_rbp_t_dTemp_dt_GND/rbp_t/rbp_t):0.0);
Gbp = ((rbp_t>1.0e-3)?(1.0/rbp_t):1.0e3);

d_Gs_dTemp_dt_GND = ((rs_t>1.0e-3)?(-d_rs_t_dTemp_dt_GND/rs_t/rs_t):0.0);
Gs = ((rs_t>1.0e-3)?(1.0/rs_t):1.0e3);

d_Gth_dTemp_dt_GND = ((rth_t>1.0e-3)?(-d_rth_t_dTemp_dt_GND/rth_t/rth_t):0.0);
Gth = ((rth_t>1.0e-3)?(1.0/rth_t):1.0e3);

d_Ivef_dTemp_dt_GND = ((vef_t>0.0)?(-d_vef_t_dTemp_dt_GND/vef_t/vef_t):0.0);
Ivef = ((vef_t>0.0)?(1.0/vef_t):0.0);

d_Iver_dTemp_dt_GND = ((ver_t>0.0)?(-d_ver_t_dTemp_dt_GND/ver_t/ver_t):0.0);
Iver = ((ver_t>0.0)?(1.0/ver_t):0.0);

d_Iikf_dTemp_dt_GND = ((ikf_t>0.0)?(-d_ikf_t_dTemp_dt_GND/ikf_t/ikf_t):0.0);
Iikf = ((ikf_t>0.0)?(1.0/ikf_t):0.0);

d_Ivo_dTemp_dt_GND = ((vo_t>0.0)?(-d_vo_t_dTemp_dt_GND/vo_t/vo_t):0.0);
Ivo = ((vo_t>0.0)?(1.0/vo_t):0.0);


//Vbei = ($limit(V(bi,ei),"typedpnjlim_new",$vt(),tVCrit,VBICtype));
if (getDeviceOptions().voltageLimiterFlag)
{
  int icheck=0;
  Vbei_limited = devSupport.pnjlim_new(Vbei_limited,Vbei_old,adms_vt_nom,tVCrit,&icheck);
  if (icheck == 1)
     origFlag = false;
  if (!origFlag)
  {
    probeDiffs[admsProbeID_V_bi_ei] = Vbei_limited - Vbei_orig;
    probeVars[admsProbeID_V_bi_ei] += probeDiffs[admsProbeID_V_bi_ei];
  }
}
Vbei = probeVars[admsProbeID_V_bi_ei];

d_Vbei_dV_bi_ei = d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei];



//Vbex = ($limit(V(bx,ei),"typedpnjlim_new",$vt(),tVCrit,VBICtype));
if (getDeviceOptions().voltageLimiterFlag)
{
  int icheck=0;
  Vbex_limited = devSupport.pnjlim_new(Vbex_limited,Vbex_old,adms_vt_nom,tVCrit,&icheck);
  if (icheck == 1)
     origFlag = false;
  if (!origFlag)
  {
    probeDiffs[admsProbeID_V_bx_ei] = Vbex_limited - Vbex_orig;
    probeVars[admsProbeID_V_bx_ei] += probeDiffs[admsProbeID_V_bx_ei];
  }
}
Vbex = probeVars[admsProbeID_V_bx_ei];

d_Vbex_dV_bx_ei = d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei];



//Vbci = ($limit(V(bi,ci),"typedpnjlim_new",$vt(),tVCrit,VBICtype));
if (getDeviceOptions().voltageLimiterFlag)
{
  int icheck=0;
  Vbci_limited = devSupport.pnjlim_new(Vbci_limited,Vbci_old,adms_vt_nom,tVCrit,&icheck);
  if (icheck == 1)
     origFlag = false;
  if (!origFlag)
  {
    probeDiffs[admsProbeID_V_bi_ci] = Vbci_limited - Vbci_orig;
    probeVars[admsProbeID_V_bi_ci] += probeDiffs[admsProbeID_V_bi_ci];
  }
}
Vbci = probeVars[admsProbeID_V_bi_ci];

d_Vbci_dV_bi_ci = d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci];



//Vbcx = ($limit(V(bi,cx),"typedpnjlim_new",$vt(),tVCrit,VBICtype));
if (getDeviceOptions().voltageLimiterFlag)
{
  int icheck=0;
  Vbcx_limited = devSupport.pnjlim_new(Vbcx_limited,Vbcx_old,adms_vt_nom,tVCrit,&icheck);
  if (icheck == 1)
     origFlag = false;
  if (!origFlag)
  {
    probeDiffs[admsProbeID_V_bi_cx] = Vbcx_limited - Vbcx_orig;
    probeVars[admsProbeID_V_bi_cx] += probeDiffs[admsProbeID_V_bi_cx];
  }
}
Vbcx = probeVars[admsProbeID_V_bi_cx];

d_Vbcx_dV_bi_cx = d_probeVars[admsProbeID_V_bi_cx][admsProbeID_V_bi_cx];



//Vbxcx = ($limit(V(bx,cx),"typedpnjlim_new",$vt(),tVCrit,VBICtype));
if (getDeviceOptions().voltageLimiterFlag)
{
  int icheck=0;
  Vbxcx_limited = devSupport.pnjlim_new(Vbxcx_limited,Vbxcx_old,adms_vt_nom,tVCrit,&icheck);
  if (icheck == 1)
     origFlag = false;
  if (!origFlag)
  {
    probeDiffs[admsProbeID_V_bx_cx] = Vbxcx_limited - Vbxcx_orig;
    probeVars[admsProbeID_V_bx_cx] += probeDiffs[admsProbeID_V_bx_cx];
  }
}
Vbxcx = probeVars[admsProbeID_V_bx_cx];

d_Vbxcx_dV_bx_cx = d_probeVars[admsProbeID_V_bx_cx][admsProbeID_V_bx_cx];


d_Vcei_dV_ci_ei = (model_.VBICtype)*d_probeVars[admsProbeID_V_ci_ei][admsProbeID_V_ci_ei];
Vcei = ((model_.VBICtype)*(probeVars[admsProbeID_V_ci_ei]));


//Vbep = ($limit(V(bx,bp),"typedpnjlim_new",$vt(),tVCrit,VBICtype));
if (getDeviceOptions().voltageLimiterFlag)
{
  int icheck=0;
  Vbep_limited = devSupport.pnjlim_new(Vbep_limited,Vbep_old,adms_vt_nom,tVCrit,&icheck);
  if (icheck == 1)
     origFlag = false;
  if (!origFlag)
  {
    probeDiffs[admsProbeID_V_bx_bp] = Vbep_limited - Vbep_orig;
    probeVars[admsProbeID_V_bx_bp] += probeDiffs[admsProbeID_V_bx_bp];
  }
}
Vbep = probeVars[admsProbeID_V_bx_bp];

d_Vbep_dV_bx_bp = d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp];



//Vbe = ($limit(V(b,e),"dummy",$vt(),tVCrit));
if (getDeviceOptions().voltageLimiterFlag)
{
  int icheck=0;
  // dummy limiting for initialization purposes
  if (icheck == 1)
     origFlag = false;
  if (!origFlag)
  {
    probeDiffs[admsProbeID_V_b_e] = Vbe_limited - Vbe_orig;
    probeVars[admsProbeID_V_b_e] += probeDiffs[admsProbeID_V_b_e];
  }
}
Vbe = probeVars[admsProbeID_V_b_e];

d_Vbe_dV_b_e = d_probeVars[admsProbeID_V_b_e][admsProbeID_V_b_e];


d_Vbc_dV_b_c = d_probeVars[admsProbeID_V_b_c][admsProbeID_V_b_c];
Vbc = (probeVars[admsProbeID_V_b_c]);

d_Vrcx_dV_c_cx = d_probeVars[admsProbeID_V_c_cx][admsProbeID_V_c_cx];
Vrcx = (probeVars[admsProbeID_V_c_cx]);

d_Vrci_dV_cx_ci = (model_.VBICtype)*d_probeVars[admsProbeID_V_cx_ci][admsProbeID_V_cx_ci];
Vrci = ((model_.VBICtype)*(probeVars[admsProbeID_V_cx_ci]));

d_Vrbx_dV_b_bx = d_probeVars[admsProbeID_V_b_bx][admsProbeID_V_b_bx];
Vrbx = (probeVars[admsProbeID_V_b_bx]);

d_Vrbi_dV_bx_bi = d_probeVars[admsProbeID_V_bx_bi][admsProbeID_V_bx_bi];
Vrbi = (probeVars[admsProbeID_V_bx_bi]);

d_Vre_dV_e_ei = d_probeVars[admsProbeID_V_e_ei][admsProbeID_V_e_ei];
Vre = (probeVars[admsProbeID_V_e_ei]);

d_Vrbp_dV_bp_cx = d_probeVars[admsProbeID_V_bp_cx][admsProbeID_V_bp_cx];
Vrbp = (probeVars[admsProbeID_V_bp_cx]);

d_Vbcp_dV_si_bp = (model_.VBICtype)*d_probeVars[admsProbeID_V_si_bp][admsProbeID_V_si_bp];
Vbcp = ((model_.VBICtype)*(probeVars[admsProbeID_V_si_bp]));

d_Vcep_dV_bx_si = (model_.VBICtype)*d_probeVars[admsProbeID_V_bx_si][admsProbeID_V_bx_si];
Vcep = ((model_.VBICtype)*(probeVars[admsProbeID_V_bx_si]));

d_Vrs_dV_s_si = d_probeVars[admsProbeID_V_s_si][admsProbeID_V_s_si];
Vrs = (probeVars[admsProbeID_V_s_si]);

d_Vxf1_dV_xf1_GND = d_probeVars[admsProbeID_V_xf1_GND][admsProbeID_V_xf1_GND];
Vxf1 = (probeVars[admsProbeID_V_xf1_GND]);

d_Vxf2_dV_xf2_GND = d_probeVars[admsProbeID_V_xf2_GND][admsProbeID_V_xf2_GND];
Vxf2 = (probeVars[admsProbeID_V_xf2_GND]);
//Begin block qdbeBlock
{
//Block-local variables for block qdbeBlock
double dv0=0.0;
     double d_dv0_dTemp_dt_GND=0.0;
double dvh=0.0;
     double d_dvh_dV_bi_ei=0.0;
     double d_dvh_dTemp_dt_GND=0.0;
double pwq=0.0;
double qlo=0.0;
     double d_qlo_dV_bi_ei=0.0;
     double d_qlo_dTemp_dt_GND=0.0;
double qhi=0.0;
     double d_qhi_dV_bi_ei=0.0;
     double d_qhi_dTemp_dt_GND=0.0;
double mv0=0.0;
     double d_mv0_dTemp_dt_GND=0.0;
double vl0=0.0;
     double d_vl0_dTemp_dt_GND=0.0;
double q0=0.0;
     double d_q0_dTemp_dt_GND=0.0;
double dv=0.0;
     double d_dv_dV_bi_ei=0.0;
     double d_dv_dTemp_dt_GND=0.0;
double mv=0.0;
     double d_mv_dV_bi_ei=0.0;
     double d_mv_dTemp_dt_GND=0.0;
double vl=0.0;
     double d_vl_dV_bi_ei=0.0;
     double d_vl_dTemp_dt_GND=0.0;
//End of Block-local variables

d_dv0_dTemp_dt_GND = (-d_pe_t_dTemp_dt_GND)*(model_.fc);
dv0 = ((-pe_t)*(model_.fc));
if (((model_.aje)<=0.0))
{

d_dvh_dTemp_dt_GND = d_dv0_dTemp_dt_GND;
d_dvh_dV_bi_ei = d_Vbei_dV_bi_ei;
dvh = (Vbei+dv0);
if ((dvh>0.0))
{
{
double value_pow_0 = pow((1.0-(model_.fc)),(-(model_.me)));
pwq = value_pow_0;
}

d_qlo_dV_bi_ei =  0.0;
d_qlo_dTemp_dt_GND = (d_pe_t_dTemp_dt_GND*(1.0-(pwq*(1.0-(model_.fc))))/(1.0-(model_.me)));
qlo = ((pe_t*(1.0-(pwq*(1.0-(model_.fc)))))/(1.0-(model_.me)));

d_qhi_dTemp_dt_GND = (dvh*(((pe_t*(1.0-(model_.fc)))*(0.5*(model_.me))*d_dvh_dTemp_dt_GND-((0.5*(model_.me))*dvh)*d_pe_t_dTemp_dt_GND*(1.0-(model_.fc)))/(pe_t*(1.0-(model_.fc)))/(pe_t*(1.0-(model_.fc))))+d_dvh_dTemp_dt_GND*(1.0+(((0.5*(model_.me))*dvh)/(pe_t*(1.0-(model_.fc))))))*pwq;
d_qhi_dV_bi_ei = (dvh*((0.5*(model_.me))*d_dvh_dV_bi_ei/(pe_t*(1.0-(model_.fc))))+d_dvh_dV_bi_ei*(1.0+(((0.5*(model_.me))*dvh)/(pe_t*(1.0-(model_.fc))))))*pwq;
qhi = ((dvh*(1.0+(((0.5*(model_.me))*dvh)/(pe_t*(1.0-(model_.fc))))))*pwq);
}
else
{
{
double value_pow_0 = pow((1.0-(Vbei/pe_t)),(1.0-(model_.me)));
double  deriv_pow_0_d0 = (((1.0-(Vbei/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.me))/(1.0-(Vbei/pe_t))));

d_qlo_dV_bi_ei = (pe_t*(-(deriv_pow_0_d0*((-(d_Vbei_dV_bi_ei/pe_t)))))/(1.0-(model_.me)));
d_qlo_dTemp_dt_GND = ((pe_t*(-(deriv_pow_0_d0*((-(-Vbei*d_pe_t_dTemp_dt_GND/pe_t/pe_t)))))+d_pe_t_dTemp_dt_GND*(1.0-value_pow_0))/(1.0-(model_.me)));
qlo = ((pe_t*(1.0-value_pow_0))/(1.0-(model_.me)));
}

d_qhi_dV_bi_ei = d_qhi_dTemp_dt_GND =  0.0;
qhi = 0.0;
}

d_qdbe_dTemp_dt_GND = (d_qlo_dTemp_dt_GND+d_qhi_dTemp_dt_GND);
d_qdbe_dV_bi_ei = (d_qlo_dV_bi_ei+d_qhi_dV_bi_ei);
qdbe = (qlo+qhi);
}
else
{
{
double value_sqrt_0 = sqrt(((dv0*dv0)+((4.0*(model_.aje))*(model_.aje))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_mv0_dTemp_dt_GND = (deriv_sqrt_0_d0*((dv0*d_dv0_dTemp_dt_GND+d_dv0_dTemp_dt_GND*dv0)));
mv0 = value_sqrt_0;
}

d_vl0_dTemp_dt_GND = (-0.5)*(d_dv0_dTemp_dt_GND+d_mv0_dTemp_dt_GND);
vl0 = ((-0.5)*(dv0+mv0));
{
double value_pow_0 = pow((1.0-(vl0/pe_t)),(1.0-(model_.me)));
double  deriv_pow_0_d0 = (((1.0-(vl0/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.me))/(1.0-(vl0/pe_t))));

d_q0_dTemp_dt_GND = (((-pe_t)*(deriv_pow_0_d0*((-((pe_t*d_vl0_dTemp_dt_GND-vl0*d_pe_t_dTemp_dt_GND)/pe_t/pe_t))))+(-d_pe_t_dTemp_dt_GND)*value_pow_0)/(1.0-(model_.me)));
q0 = (((-pe_t)*value_pow_0)/(1.0-(model_.me)));
}

d_dv_dTemp_dt_GND = d_dv0_dTemp_dt_GND;
d_dv_dV_bi_ei = d_Vbei_dV_bi_ei;
dv = (Vbei+dv0);
{
double value_sqrt_0 = sqrt(((dv*dv)+((4.0*(model_.aje))*(model_.aje))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_mv_dTemp_dt_GND = (deriv_sqrt_0_d0*((dv*d_dv_dTemp_dt_GND+d_dv_dTemp_dt_GND*dv)));
d_mv_dV_bi_ei = (deriv_sqrt_0_d0*((dv*d_dv_dV_bi_ei+d_dv_dV_bi_ei*dv)));
mv = value_sqrt_0;
}

d_vl_dTemp_dt_GND = (0.5*(d_dv_dTemp_dt_GND-d_mv_dTemp_dt_GND)-d_dv0_dTemp_dt_GND);
d_vl_dV_bi_ei = 0.5*(d_dv_dV_bi_ei-d_mv_dV_bi_ei);
vl = ((0.5*(dv-mv))-dv0);
{
double value_pow_0 = pow((1.0-(vl/pe_t)),(1.0-(model_.me)));
double  deriv_pow_0_d0 = (((1.0-(vl/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.me))/(1.0-(vl/pe_t))));

d_qlo_dV_bi_ei = ((-pe_t)*(deriv_pow_0_d0*((-(d_vl_dV_bi_ei/pe_t))))/(1.0-(model_.me)));
d_qlo_dTemp_dt_GND = (((-pe_t)*(deriv_pow_0_d0*((-((pe_t*d_vl_dTemp_dt_GND-vl*d_pe_t_dTemp_dt_GND)/pe_t/pe_t))))+(-d_pe_t_dTemp_dt_GND)*value_pow_0)/(1.0-(model_.me)));
qlo = (((-pe_t)*value_pow_0)/(1.0-(model_.me)));
}
{
double value_pow_0 = pow((1.0-(model_.fc)),(-(model_.me)));

d_qdbe_dTemp_dt_GND = ((d_qlo_dTemp_dt_GND+((value_pow_0*((Vbei-vl)+vl0))*(((pe_t*(1.0-(model_.fc)))*(0.5*(model_.me))*((-d_vl_dTemp_dt_GND)+d_vl0_dTemp_dt_GND)-((0.5*(model_.me))*((Vbei-vl)+vl0))*d_pe_t_dTemp_dt_GND*(1.0-(model_.fc)))/(pe_t*(1.0-(model_.fc)))/(pe_t*(1.0-(model_.fc))))+value_pow_0*((-d_vl_dTemp_dt_GND)+d_vl0_dTemp_dt_GND)*(1.0+(((0.5*(model_.me))*((Vbei-vl)+vl0))/(pe_t*(1.0-(model_.fc)))))))-d_q0_dTemp_dt_GND);
d_qdbe_dV_bi_ei = (d_qlo_dV_bi_ei+((value_pow_0*((Vbei-vl)+vl0))*((0.5*(model_.me))*(d_Vbei_dV_bi_ei-d_vl_dV_bi_ei)/(pe_t*(1.0-(model_.fc))))+value_pow_0*(d_Vbei_dV_bi_ei-d_vl_dV_bi_ei)*(1.0+(((0.5*(model_.me))*((Vbei-vl)+vl0))/(pe_t*(1.0-(model_.fc)))))));
qdbe = ((qlo+((value_pow_0*((Vbei-vl)+vl0))*(1.0+(((0.5*(model_.me))*((Vbei-vl)+vl0))/(pe_t*(1.0-(model_.fc)))))))-q0);
}
}
}
// End block qdbeBlock
//Begin block qdbcBlock
{
//Block-local variables for block qdbcBlock
double dv0=0.0;
     double d_dv0_dTemp_dt_GND=0.0;
double dvh=0.0;
     double d_dvh_dV_bi_ci=0.0;
     double d_dvh_dTemp_dt_GND=0.0;
double pwq=0.0;
double qlo=0.0;
     double d_qlo_dV_bi_ci=0.0;
     double d_qlo_dTemp_dt_GND=0.0;
double qhi=0.0;
     double d_qhi_dV_bi_ci=0.0;
     double d_qhi_dTemp_dt_GND=0.0;
double vn0=0.0;
     double d_vn0_dTemp_dt_GND=0.0;
double vnl0=0.0;
     double d_vnl0_dTemp_dt_GND=0.0;
double vl0=0.0;
     double d_vl0_dTemp_dt_GND=0.0;
double qlo0=0.0;
     double d_qlo0_dTemp_dt_GND=0.0;
double vn=0.0;
     double d_vn_dV_bi_ci=0.0;
     double d_vn_dTemp_dt_GND=0.0;
double vnl=0.0;
     double d_vnl_dV_bi_ci=0.0;
     double d_vnl_dTemp_dt_GND=0.0;
double vl=0.0;
     double d_vl_dV_bi_ci=0.0;
     double d_vl_dTemp_dt_GND=0.0;
double sel=0.0;
     double d_sel_dV_bi_ci=0.0;
     double d_sel_dTemp_dt_GND=0.0;
double crt=0.0;
     double d_crt_dTemp_dt_GND=0.0;
double cmx=0.0;
     double d_cmx_dTemp_dt_GND=0.0;
double cl=0.0;
     double d_cl_dV_bi_ci=0.0;
     double d_cl_dTemp_dt_GND=0.0;
double ql=0.0;
     double d_ql_dV_bi_ci=0.0;
     double d_ql_dTemp_dt_GND=0.0;
double mv0=0.0;
     double d_mv0_dTemp_dt_GND=0.0;
double q0=0.0;
     double d_q0_dTemp_dt_GND=0.0;
double dv=0.0;
     double d_dv_dV_bi_ci=0.0;
     double d_dv_dTemp_dt_GND=0.0;
double mv=0.0;
     double d_mv_dV_bi_ci=0.0;
     double d_mv_dTemp_dt_GND=0.0;
//End of Block-local variables

d_dv0_dTemp_dt_GND = (-d_pc_t_dTemp_dt_GND)*(model_.fc);
dv0 = ((-pc_t)*(model_.fc));
if (((model_.ajc)<=0.0))
{

d_dvh_dTemp_dt_GND = d_dv0_dTemp_dt_GND;
d_dvh_dV_bi_ci = d_Vbci_dV_bi_ci;
dvh = (Vbci+dv0);
if ((dvh>0.0))
{
{
double value_pow_0 = pow((1.0-(model_.fc)),((-1.0)-(model_.mc)));
pwq = value_pow_0;
}

d_qlo_dV_bi_ci =  0.0;
d_qlo_dTemp_dt_GND = (d_pc_t_dTemp_dt_GND*(1.0-((pwq*(1.0-(model_.fc)))*(1.0-(model_.fc))))/(1.0-(model_.mc)));
qlo = ((pc_t*(1.0-((pwq*(1.0-(model_.fc)))*(1.0-(model_.fc)))))/(1.0-(model_.mc)));

d_qhi_dTemp_dt_GND = (dvh*((pc_t*(0.5*(model_.mc))*d_dvh_dTemp_dt_GND-((0.5*(model_.mc))*dvh)*d_pc_t_dTemp_dt_GND)/pc_t/pc_t)+d_dvh_dTemp_dt_GND*((1.0-(model_.fc))+(((0.5*(model_.mc))*dvh)/pc_t)))*pwq;
d_qhi_dV_bi_ci = (dvh*((0.5*(model_.mc))*d_dvh_dV_bi_ci/pc_t)+d_dvh_dV_bi_ci*((1.0-(model_.fc))+(((0.5*(model_.mc))*dvh)/pc_t)))*pwq;
qhi = ((dvh*((1.0-(model_.fc))+(((0.5*(model_.mc))*dvh)/pc_t)))*pwq);
}
else
{
if ((((model_.vrt)>0.0)&&(Vbci<(-(model_.vrt)))))
{
{
double value_pow_0 = pow((1.0+((model_.vrt)/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0+((model_.vrt)/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0+((model_.vrt)/pc_t))));

d_qlo_dV_bi_ci = (pc_t*(-value_pow_0*(-((1.0-(model_.mc))*d_Vbci_dV_bi_ci/(pc_t+(model_.vrt)))))/(1.0-(model_.mc)));
d_qlo_dTemp_dt_GND = ((pc_t*(-(value_pow_0*(-(-((1.0-(model_.mc))*(Vbci+(model_.vrt)))*d_pc_t_dTemp_dt_GND/(pc_t+(model_.vrt))/(pc_t+(model_.vrt))))+(deriv_pow_0_d0*((-(model_.vrt)*d_pc_t_dTemp_dt_GND/pc_t/pc_t)))*(1.0-(((1.0-(model_.mc))*(Vbci+(model_.vrt)))/(pc_t+(model_.vrt))))))+d_pc_t_dTemp_dt_GND*(1.0-(value_pow_0*(1.0-(((1.0-(model_.mc))*(Vbci+(model_.vrt)))/(pc_t+(model_.vrt)))))))/(1.0-(model_.mc)));
qlo = ((pc_t*(1.0-(value_pow_0*(1.0-(((1.0-(model_.mc))*(Vbci+(model_.vrt)))/(pc_t+(model_.vrt)))))))/(1.0-(model_.mc)));
}
}
else
{
{
double value_pow_0 = pow((1.0-(Vbci/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0-(Vbci/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0-(Vbci/pc_t))));

d_qlo_dV_bi_ci = (pc_t*(-(deriv_pow_0_d0*((-(d_Vbci_dV_bi_ci/pc_t)))))/(1.0-(model_.mc)));
d_qlo_dTemp_dt_GND = ((pc_t*(-(deriv_pow_0_d0*((-(-Vbci*d_pc_t_dTemp_dt_GND/pc_t/pc_t)))))+d_pc_t_dTemp_dt_GND*(1.0-value_pow_0))/(1.0-(model_.mc)));
qlo = ((pc_t*(1.0-value_pow_0))/(1.0-(model_.mc)));
}
}

d_qhi_dV_bi_ci = d_qhi_dTemp_dt_GND =  0.0;
qhi = 0.0;
}

d_qdbc_dTemp_dt_GND = (d_qlo_dTemp_dt_GND+d_qhi_dTemp_dt_GND);
d_qdbc_dV_bi_ci = (d_qlo_dV_bi_ci+d_qhi_dV_bi_ci);
qdbc = (qlo+qhi);
}
else
{
if ((((model_.vrt)>0.0)&&((model_.art)>0.0)))
{

d_vn0_dTemp_dt_GND = ((((model_.vrt)-dv0)*d_dv0_dTemp_dt_GND-((model_.vrt)+dv0)*(-d_dv0_dTemp_dt_GND))/((model_.vrt)-dv0)/((model_.vrt)-dv0));
vn0 = (((model_.vrt)+dv0)/((model_.vrt)-dv0));
{
double value_sqrt_0 = sqrt((((vn0-1.0)*(vn0-1))+((4*(model_.ajc))*(model_.ajc))));
double value_sqrt_1 = sqrt((((vn0+1.0)*(vn0+1))+((4*(model_.art))*(model_.art))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);

d_vnl0_dTemp_dt_GND = (((value_sqrt_0+value_sqrt_1)*2.0*d_vn0_dTemp_dt_GND-(2.0*vn0)*((deriv_sqrt_0_d0*(((vn0-1.0)*d_vn0_dTemp_dt_GND+d_vn0_dTemp_dt_GND*(vn0-1))))+(deriv_sqrt_1_d0*(((vn0+1.0)*d_vn0_dTemp_dt_GND+d_vn0_dTemp_dt_GND*(vn0+1))))))/(value_sqrt_0+value_sqrt_1)/(value_sqrt_0+value_sqrt_1));
vnl0 = ((2.0*vn0)/(value_sqrt_0+value_sqrt_1));
}

d_vl0_dTemp_dt_GND = 0.5*((vnl0*(-d_dv0_dTemp_dt_GND)+d_vnl0_dTemp_dt_GND*((model_.vrt)-dv0))-d_dv0_dTemp_dt_GND);
vl0 = (0.5*(((vnl0*((model_.vrt)-dv0))-(model_.vrt))-dv0));
{
double value_pow_0 = pow((1.0-(vl0/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0-(vl0/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0-(vl0/pc_t))));

d_qlo0_dTemp_dt_GND = ((pc_t*(-(deriv_pow_0_d0*((-((pc_t*d_vl0_dTemp_dt_GND-vl0*d_pc_t_dTemp_dt_GND)/pc_t/pc_t)))))+d_pc_t_dTemp_dt_GND*(1.0-value_pow_0))/(1.0-(model_.mc)));
qlo0 = ((pc_t*(1.0-value_pow_0))/(1.0-(model_.mc)));
}

d_vn_dTemp_dt_GND = ((((model_.vrt)-dv0)*d_dv0_dTemp_dt_GND-(((2*Vbci)+(model_.vrt))+dv0)*(-d_dv0_dTemp_dt_GND))/((model_.vrt)-dv0)/((model_.vrt)-dv0));
d_vn_dV_bi_ci = (2*d_Vbci_dV_bi_ci/((model_.vrt)-dv0));
vn = ((((2*Vbci)+(model_.vrt))+dv0)/((model_.vrt)-dv0));
{
double value_sqrt_0 = sqrt((((vn-1.0)*(vn-1))+((4*(model_.ajc))*(model_.ajc))));
double value_sqrt_1 = sqrt((((vn+1.0)*(vn+1))+((4*(model_.art))*(model_.art))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);

d_vnl_dTemp_dt_GND = (((value_sqrt_0+value_sqrt_1)*2.0*d_vn_dTemp_dt_GND-(2.0*vn)*((deriv_sqrt_0_d0*(((vn-1.0)*d_vn_dTemp_dt_GND+d_vn_dTemp_dt_GND*(vn-1))))+(deriv_sqrt_1_d0*(((vn+1.0)*d_vn_dTemp_dt_GND+d_vn_dTemp_dt_GND*(vn+1))))))/(value_sqrt_0+value_sqrt_1)/(value_sqrt_0+value_sqrt_1));
d_vnl_dV_bi_ci = (((value_sqrt_0+value_sqrt_1)*2.0*d_vn_dV_bi_ci-(2.0*vn)*((deriv_sqrt_0_d0*(((vn-1.0)*d_vn_dV_bi_ci+d_vn_dV_bi_ci*(vn-1))))+(deriv_sqrt_1_d0*(((vn+1.0)*d_vn_dV_bi_ci+d_vn_dV_bi_ci*(vn+1))))))/(value_sqrt_0+value_sqrt_1)/(value_sqrt_0+value_sqrt_1));
vnl = ((2.0*vn)/(value_sqrt_0+value_sqrt_1));
}

d_vl_dTemp_dt_GND = 0.5*((vnl*(-d_dv0_dTemp_dt_GND)+d_vnl_dTemp_dt_GND*((model_.vrt)-dv0))-d_dv0_dTemp_dt_GND);
d_vl_dV_bi_ci = 0.5*d_vnl_dV_bi_ci*((model_.vrt)-dv0);
vl = (0.5*(((vnl*((model_.vrt)-dv0))-(model_.vrt))-dv0));
{
double value_pow_0 = pow((1.0-(vl/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0-(vl/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0-(vl/pc_t))));

d_qlo_dV_bi_ci = (pc_t*(-(deriv_pow_0_d0*((-(d_vl_dV_bi_ci/pc_t)))))/(1.0-(model_.mc)));
d_qlo_dTemp_dt_GND = ((pc_t*(-(deriv_pow_0_d0*((-((pc_t*d_vl_dTemp_dt_GND-vl*d_pc_t_dTemp_dt_GND)/pc_t/pc_t)))))+d_pc_t_dTemp_dt_GND*(1.0-value_pow_0))/(1.0-(model_.mc)));
qlo = ((pc_t*(1.0-value_pow_0))/(1.0-(model_.mc)));
}

d_sel_dTemp_dt_GND = 0.5*d_vnl_dTemp_dt_GND;
d_sel_dV_bi_ci = 0.5*d_vnl_dV_bi_ci;
sel = (0.5*(vnl+1.0));
{
double value_pow_0 = pow((1.0+((model_.vrt)/pc_t)),(-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0+((model_.vrt)/pc_t)) == 0.0)?0.0:(value_pow_0*(-(model_.mc))/(1.0+((model_.vrt)/pc_t))));

d_crt_dTemp_dt_GND = (deriv_pow_0_d0*((-(model_.vrt)*d_pc_t_dTemp_dt_GND/pc_t/pc_t)));
crt = value_pow_0;
}
{
double value_pow_0 = pow((1.0+(dv0/pc_t)),(-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0+(dv0/pc_t)) == 0.0)?0.0:(value_pow_0*(-(model_.mc))/(1.0+(dv0/pc_t))));

d_cmx_dTemp_dt_GND = (deriv_pow_0_d0*(((pc_t*d_dv0_dTemp_dt_GND-dv0*d_pc_t_dTemp_dt_GND)/pc_t/pc_t)));
cmx = value_pow_0;
}

d_cl_dTemp_dt_GND = (((1.0-sel)*d_crt_dTemp_dt_GND+(-d_sel_dTemp_dt_GND)*crt)+(sel*d_cmx_dTemp_dt_GND+d_sel_dTemp_dt_GND*cmx));
d_cl_dV_bi_ci = ((-d_sel_dV_bi_ci)*crt+d_sel_dV_bi_ci*cmx);
cl = (((1.0-sel)*crt)+(sel*cmx));

d_ql_dTemp_dt_GND = (((Vbci-vl)+vl0)*d_cl_dTemp_dt_GND+((-d_vl_dTemp_dt_GND)+d_vl0_dTemp_dt_GND)*cl);
d_ql_dV_bi_ci = (((Vbci-vl)+vl0)*d_cl_dV_bi_ci+(d_Vbci_dV_bi_ci-d_vl_dV_bi_ci)*cl);
ql = (((Vbci-vl)+vl0)*cl);

d_qdbc_dTemp_dt_GND = ((d_ql_dTemp_dt_GND+d_qlo_dTemp_dt_GND)-d_qlo0_dTemp_dt_GND);
d_qdbc_dV_bi_ci = (d_ql_dV_bi_ci+d_qlo_dV_bi_ci);
qdbc = ((ql+qlo)-qlo0);
}
else
{
{
double value_sqrt_0 = sqrt(((dv0*dv0)+((4*(model_.ajc))*(model_.ajc))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_mv0_dTemp_dt_GND = (deriv_sqrt_0_d0*((dv0*d_dv0_dTemp_dt_GND+d_dv0_dTemp_dt_GND*dv0)));
mv0 = value_sqrt_0;
}

d_vl0_dTemp_dt_GND = (-0.5)*(d_dv0_dTemp_dt_GND+d_mv0_dTemp_dt_GND);
vl0 = ((-0.5)*(dv0+mv0));
{
double value_pow_0 = pow((1.0-(vl0/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0-(vl0/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0-(vl0/pc_t))));

d_q0_dTemp_dt_GND = (((-pc_t)*(deriv_pow_0_d0*((-((pc_t*d_vl0_dTemp_dt_GND-vl0*d_pc_t_dTemp_dt_GND)/pc_t/pc_t))))+(-d_pc_t_dTemp_dt_GND)*value_pow_0)/(1.0-(model_.mc)));
q0 = (((-pc_t)*value_pow_0)/(1.0-(model_.mc)));
}

d_dv_dTemp_dt_GND = d_dv0_dTemp_dt_GND;
d_dv_dV_bi_ci = d_Vbci_dV_bi_ci;
dv = (Vbci+dv0);
{
double value_sqrt_0 = sqrt(((dv*dv)+((4*(model_.ajc))*(model_.ajc))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_mv_dTemp_dt_GND = (deriv_sqrt_0_d0*((dv*d_dv_dTemp_dt_GND+d_dv_dTemp_dt_GND*dv)));
d_mv_dV_bi_ci = (deriv_sqrt_0_d0*((dv*d_dv_dV_bi_ci+d_dv_dV_bi_ci*dv)));
mv = value_sqrt_0;
}

d_vl_dTemp_dt_GND = (0.5*(d_dv_dTemp_dt_GND-d_mv_dTemp_dt_GND)-d_dv0_dTemp_dt_GND);
d_vl_dV_bi_ci = 0.5*(d_dv_dV_bi_ci-d_mv_dV_bi_ci);
vl = ((0.5*(dv-mv))-dv0);
{
double value_pow_0 = pow((1.0-(vl/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0-(vl/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0-(vl/pc_t))));

d_qlo_dV_bi_ci = ((-pc_t)*(deriv_pow_0_d0*((-(d_vl_dV_bi_ci/pc_t))))/(1.0-(model_.mc)));
d_qlo_dTemp_dt_GND = (((-pc_t)*(deriv_pow_0_d0*((-((pc_t*d_vl_dTemp_dt_GND-vl*d_pc_t_dTemp_dt_GND)/pc_t/pc_t))))+(-d_pc_t_dTemp_dt_GND)*value_pow_0)/(1.0-(model_.mc)));
qlo = (((-pc_t)*value_pow_0)/(1.0-(model_.mc)));
}
{
double value_pow_0 = pow((1.0-(model_.fc)),(-(model_.mc)));

d_qdbc_dTemp_dt_GND = ((d_qlo_dTemp_dt_GND+value_pow_0*((-d_vl_dTemp_dt_GND)+d_vl0_dTemp_dt_GND))-d_q0_dTemp_dt_GND);
d_qdbc_dV_bi_ci = (d_qlo_dV_bi_ci+value_pow_0*(d_Vbci_dV_bi_ci-d_vl_dV_bi_ci));
qdbc = ((qlo+(value_pow_0*((Vbci-vl)+vl0)))-q0);
}
}
}
}
// End block qdbcBlock

d_afac_dTemp_dt_GND = (-(nf_t*d_vtv_dTemp_dt_GND+d_nf_t_dTemp_dt_GND*vtv)/(nf_t*vtv)/(nf_t*vtv));
afac = (1.0/(nf_t*vtv));
if ((Vbei<maxvIfi))
{
{
double value_exp_0 = exp((Vbei*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ci =  0.0;
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(Vbei*d_afac_dTemp_dt_GND));
d_expi_dV_bi_ei = (deriv_exp_0_d0*(d_Vbei_dV_bi_ei*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIfi*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ci =  0.0;
d_expi_dV_bi_ei = value_exp_0*d_Vbei_dV_bi_ei*afac;
d_expi_dTemp_dt_GND = (value_exp_0*(Vbei-maxvIfi)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIfi*d_afac_dTemp_dt_GND))*(1.0+((Vbei-maxvIfi)*afac)));
expi = (value_exp_0*(1.0+((Vbei-maxvIfi)*afac)));
}
}

d_Ifi_dV_bi_ei = is_t*d_expi_dV_bi_ei;
d_Ifi_dTemp_dt_GND = (is_t*d_expi_dTemp_dt_GND+d_is_t_dTemp_dt_GND*(expi-1.0));
Ifi = (is_t*(expi-1.0));

d_afac_dTemp_dt_GND = (-(nr_t*d_vtv_dTemp_dt_GND+d_nr_t_dTemp_dt_GND*vtv)/(nr_t*vtv)/(nr_t*vtv));
afac = (1.0/(nr_t*vtv));
if ((Vbci<maxvIri))
{
{
double value_exp_0 = exp((Vbci*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ei =  0.0;
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(Vbci*d_afac_dTemp_dt_GND));
d_expi_dV_bi_ci = (deriv_exp_0_d0*(d_Vbci_dV_bi_ci*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIri*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ei =  0.0;
d_expi_dV_bi_ci = value_exp_0*d_Vbci_dV_bi_ci*afac;
d_expi_dTemp_dt_GND = (value_exp_0*(Vbci-maxvIri)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIri*d_afac_dTemp_dt_GND))*(1.0+((Vbci-maxvIri)*afac)));
expi = (value_exp_0*(1.0+((Vbci-maxvIri)*afac)));
}
}

d_Iri_dV_bi_ei = (is_t*isrr_t)*d_expi_dV_bi_ei;
d_Iri_dV_bi_ci = (is_t*isrr_t)*d_expi_dV_bi_ci;
d_Iri_dTemp_dt_GND = ((is_t*isrr_t)*d_expi_dTemp_dt_GND+(is_t*d_isrr_t_dTemp_dt_GND+d_is_t_dTemp_dt_GND*isrr_t)*(expi-1.0));
Iri = ((is_t*isrr_t)*(expi-1.0));

d_q1z_dV_bi_ci = d_qdbc_dV_bi_ci*Ivef;
d_q1z_dTemp_dt_GND = ((qdbe*d_Iver_dTemp_dt_GND+d_qdbe_dTemp_dt_GND*Iver)+(qdbc*d_Ivef_dTemp_dt_GND+d_qdbc_dTemp_dt_GND*Ivef));
d_q1z_dV_bi_ei = d_qdbe_dV_bi_ei*Iver;
q1z = (((1.0+(qdbe*Iver))+(qdbc*Ivef))-1.0e-4);
{
double value_sqrt_0 = sqrt(((q1z*q1z)+1.0e-8));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_q1_dV_bi_ci = 0.5*((deriv_sqrt_0_d0*((q1z*d_q1z_dV_bi_ci+d_q1z_dV_bi_ci*q1z)))+d_q1z_dV_bi_ci);
d_q1_dTemp_dt_GND = 0.5*((deriv_sqrt_0_d0*((q1z*d_q1z_dTemp_dt_GND+d_q1z_dTemp_dt_GND*q1z)))+d_q1z_dTemp_dt_GND);
d_q1_dV_bi_ei = 0.5*((deriv_sqrt_0_d0*((q1z*d_q1z_dV_bi_ei+d_q1z_dV_bi_ei*q1z)))+d_q1z_dV_bi_ei);
q1 = ((0.5*(value_sqrt_0+q1z))+1.0e-4);
}

d_q2_dV_bi_ci = d_Iri_dV_bi_ci*(model_.Iikr);
d_q2_dV_bi_ei = (d_Ifi_dV_bi_ei*Iikf+d_Iri_dV_bi_ei*(model_.Iikr));
d_q2_dTemp_dt_GND = ((Ifi*d_Iikf_dTemp_dt_GND+d_Ifi_dTemp_dt_GND*Iikf)+d_Iri_dTemp_dt_GND*(model_.Iikr));
q2 = ((Ifi*Iikf)+(Iri*(model_.Iikr)));
if (((model_.qbm)<0.5))
{
{
double value_pow_0 = pow(q1,(1.0/(model_.nkf)));
double  deriv_pow_0_d0 = ((q1 == 0.0)?0.0:(value_pow_0*(1.0/(model_.nkf))/q1));

d_arg_dV_bi_cx = d_arg_dV_bx_bp =  0.0;
d_arg_dV_bi_ci = ((deriv_pow_0_d0*(d_q1_dV_bi_ci))+4.0*d_q2_dV_bi_ci);
d_arg_dTemp_dt_GND = ((deriv_pow_0_d0*(d_q1_dTemp_dt_GND))+4.0*d_q2_dTemp_dt_GND);
d_arg_dV_bi_ei = ((deriv_pow_0_d0*(d_q1_dV_bi_ei))+4.0*d_q2_dV_bi_ei);
arg = (value_pow_0+(4.0*q2));
}
if ((arg>1.0e-8))
{
{
double value_pow_0 = pow(arg,(model_.nkf));
double  deriv_pow_0_d0 = ((arg == 0.0)?0.0:(value_pow_0*(model_.nkf)/arg));

d_qb_dV_bi_ci = 0.5*(d_q1_dV_bi_ci+(deriv_pow_0_d0*(d_arg_dV_bi_ci)));
d_qb_dTemp_dt_GND = 0.5*(d_q1_dTemp_dt_GND+(deriv_pow_0_d0*(d_arg_dTemp_dt_GND)));
d_qb_dV_bi_ei = 0.5*(d_q1_dV_bi_ei+(deriv_pow_0_d0*(d_arg_dV_bi_ei)));
qb = (0.5*(q1+value_pow_0));
}
}
else
{
{
double value_pow_0 = pow(1.0e-8,(model_.nkf));

d_qb_dV_bi_ci = 0.5*d_q1_dV_bi_ci;
d_qb_dTemp_dt_GND = 0.5*d_q1_dTemp_dt_GND;
d_qb_dV_bi_ei = 0.5*d_q1_dV_bi_ei;
qb = (0.5*(q1+value_pow_0));
}
}
}
else
{

d_arg_dV_bi_cx = d_arg_dV_bx_bp =  0.0;
d_arg_dV_bi_ci = 4.0*d_q2_dV_bi_ci;
d_arg_dV_bi_ei = 4.0*d_q2_dV_bi_ei;
d_arg_dTemp_dt_GND = 4.0*d_q2_dTemp_dt_GND;
arg = (1.0+(4.0*q2));
if ((arg>1.0e-8))
{
{
double value_pow_0 = pow(arg,(model_.nkf));
double  deriv_pow_0_d0 = ((arg == 0.0)?0.0:(value_pow_0*(model_.nkf)/arg));

d_qb_dV_bi_ci = ((0.5*q1)*(deriv_pow_0_d0*(d_arg_dV_bi_ci))+0.5*d_q1_dV_bi_ci*(1.0+value_pow_0));
d_qb_dTemp_dt_GND = ((0.5*q1)*(deriv_pow_0_d0*(d_arg_dTemp_dt_GND))+0.5*d_q1_dTemp_dt_GND*(1.0+value_pow_0));
d_qb_dV_bi_ei = ((0.5*q1)*(deriv_pow_0_d0*(d_arg_dV_bi_ei))+0.5*d_q1_dV_bi_ei*(1.0+value_pow_0));
qb = ((0.5*q1)*(1.0+value_pow_0));
}
}
else
{
{
double value_pow_0 = pow(1.0e-8,(model_.nkf));

d_qb_dV_bi_ci = 0.5*d_q1_dV_bi_ci*(1.0+value_pow_0);
d_qb_dTemp_dt_GND = 0.5*d_q1_dTemp_dt_GND*(1.0+value_pow_0);
d_qb_dV_bi_ei = 0.5*d_q1_dV_bi_ei*(1.0+value_pow_0);
qb = ((0.5*q1)*(1.0+value_pow_0));
}
}
}

d_Itzr_dV_bi_ei = ((qb*d_Iri_dV_bi_ei-Iri*d_qb_dV_bi_ei)/qb/qb);
d_Itzr_dV_bi_ci = ((qb*d_Iri_dV_bi_ci-Iri*d_qb_dV_bi_ci)/qb/qb);
d_Itzr_dTemp_dt_GND = ((qb*d_Iri_dTemp_dt_GND-Iri*d_qb_dTemp_dt_GND)/qb/qb);
Itzr = (Iri/qb);

d_Itzf_dV_bi_ci = (-Ifi*d_qb_dV_bi_ci/qb/qb);
d_Itzf_dV_bi_ei = ((qb*d_Ifi_dV_bi_ei-Ifi*d_qb_dV_bi_ei)/qb/qb);
d_Itzf_dTemp_dt_GND = ((qb*d_Ifi_dTemp_dt_GND-Ifi*d_qb_dTemp_dt_GND)/qb/qb);
Itzf = (Ifi/qb);

d_Itxf_dV_xf2_GND = d_Vxf2_dV_xf2_GND;
Itxf = Vxf2;
if (((model_.isp)>0.0))
{

d_afac_dTemp_dt_GND = (-(model_.nfp)*d_vtv_dTemp_dt_GND/((model_.nfp)*vtv)/((model_.nfp)*vtv));
afac = (1.0/((model_.nfp)*vtv));
if ((Vbep<maxvIp))
{
{
double value_exp_0 = exp((Vbep*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(Vbep*d_afac_dTemp_dt_GND));
d_expi_dV_bx_bp = (deriv_exp_0_d0*(d_Vbep_dV_bx_bp*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIp*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dV_bx_bp = value_exp_0*d_Vbep_dV_bx_bp*afac;
d_expi_dTemp_dt_GND = (value_exp_0*(Vbep-maxvIp)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIp*d_afac_dTemp_dt_GND))*(1.0+((Vbep-maxvIp)*afac)));
expi = (value_exp_0*(1.0+((Vbep-maxvIp)*afac)));
}
}
if ((Vbci<maxvIp))
{
{
double value_exp_0 = exp((Vbci*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expx_dV_bi_cx = d_expx_dV_bx_bp = d_expx_dV_bi_ei =  0.0;
d_expx_dTemp_dt_GND = (deriv_exp_0_d0*(Vbci*d_afac_dTemp_dt_GND));
d_expx_dV_bi_ci = (deriv_exp_0_d0*(d_Vbci_dV_bi_ci*afac));
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIp*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expx_dV_bi_cx = d_expx_dV_bx_bp = d_expx_dV_bi_ei =  0.0;
d_expx_dV_bi_ci = value_exp_0*d_Vbci_dV_bi_ci*afac;
d_expx_dTemp_dt_GND = (value_exp_0*(Vbci-maxvIp)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIp*d_afac_dTemp_dt_GND))*(1.0+((Vbci-maxvIp)*afac)));
expx = (value_exp_0*(1.0+((Vbci-maxvIp)*afac)));
}
}

d_Ifp_dV_bi_ei = isp_t*((model_.wsp)*d_expi_dV_bi_ei+(1.0-(model_.wsp))*d_expx_dV_bi_ei);
d_Ifp_dV_bi_ci = isp_t*((model_.wsp)*d_expi_dV_bi_ci+(1.0-(model_.wsp))*d_expx_dV_bi_ci);
d_Ifp_dV_bx_bp = isp_t*((model_.wsp)*d_expi_dV_bx_bp+(1.0-(model_.wsp))*d_expx_dV_bx_bp);
d_Ifp_dTemp_dt_GND = (isp_t*((model_.wsp)*d_expi_dTemp_dt_GND+(1.0-(model_.wsp))*d_expx_dTemp_dt_GND)+d_isp_t_dTemp_dt_GND*((((model_.wsp)*expi)+((1.0-(model_.wsp))*expx))-1.0));
Ifp = (isp_t*((((model_.wsp)*expi)+((1.0-(model_.wsp))*expx))-1.0));

d_q2p_dV_bi_ei = d_Ifp_dV_bi_ei*(model_.Iikp);
d_q2p_dV_bi_ci = d_Ifp_dV_bi_ci*(model_.Iikp);
d_q2p_dV_bx_bp = d_Ifp_dV_bx_bp*(model_.Iikp);
d_q2p_dTemp_dt_GND = d_Ifp_dTemp_dt_GND*(model_.Iikp);
q2p = (Ifp*(model_.Iikp));

d_arg_dV_bi_cx =  0.0;
d_arg_dV_bi_ei = 4.0*d_q2p_dV_bi_ei;
d_arg_dV_bi_ci = 4.0*d_q2p_dV_bi_ci;
d_arg_dV_bx_bp = 4.0*d_q2p_dV_bx_bp;
d_arg_dTemp_dt_GND = 4.0*d_q2p_dTemp_dt_GND;
arg = (1.0+(4.0*q2p));
if ((arg>1.0e-8))
{
{
double value_sqrt_0 = sqrt(arg);
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_qbp_dV_bi_ci = 0.5*(deriv_sqrt_0_d0*(d_arg_dV_bi_ci));
d_qbp_dTemp_dt_GND = 0.5*(deriv_sqrt_0_d0*(d_arg_dTemp_dt_GND));
d_qbp_dV_bi_ei = 0.5*(deriv_sqrt_0_d0*(d_arg_dV_bi_ei));
d_qbp_dV_bx_bp = 0.5*(deriv_sqrt_0_d0*(d_arg_dV_bx_bp));
qbp = (0.5*(1.0+value_sqrt_0));
}
}
else
{
{
double value_sqrt_0 = sqrt(static_cast<double>(1.0e-8));

d_qbp_dV_bx_bp = d_qbp_dV_bi_ei = d_qbp_dTemp_dt_GND = d_qbp_dV_bi_ci =  0.0;
qbp = (0.5*(1.0+value_sqrt_0));
}
}
if ((Vbcp<maxvIp))
{
{
double value_exp_0 = exp((Vbcp*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_bx_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(Vbcp*d_afac_dTemp_dt_GND));
d_expi_dV_si_bp = (deriv_exp_0_d0*(d_Vbcp_dV_si_bp*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIp*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_bx_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dV_si_bp = value_exp_0*d_Vbcp_dV_si_bp*afac;
d_expi_dTemp_dt_GND = (value_exp_0*(Vbcp-maxvIp)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIp*d_afac_dTemp_dt_GND))*(1.0+((Vbcp-maxvIp)*afac)));
expi = (value_exp_0*(1.0+((Vbcp-maxvIp)*afac)));
}
}

d_Irp_dV_bi_ei = isp_t*d_expi_dV_bi_ei;
d_Irp_dV_bi_ci = isp_t*d_expi_dV_bi_ci;
d_Irp_dV_bx_bp = isp_t*d_expi_dV_bx_bp;
d_Irp_dV_si_bp = isp_t*d_expi_dV_si_bp;
d_Irp_dTemp_dt_GND = (isp_t*d_expi_dTemp_dt_GND+d_isp_t_dTemp_dt_GND*(expi-1.0));
Irp = (isp_t*(expi-1.0));

d_Iccp_dV_si_bp = ((-d_Irp_dV_si_bp)/qbp);
d_Iccp_dV_bi_ei = ((qbp*(d_Ifp_dV_bi_ei-d_Irp_dV_bi_ei)-(Ifp-Irp)*d_qbp_dV_bi_ei)/qbp/qbp);
d_Iccp_dV_bi_ci = ((qbp*(d_Ifp_dV_bi_ci-d_Irp_dV_bi_ci)-(Ifp-Irp)*d_qbp_dV_bi_ci)/qbp/qbp);
d_Iccp_dV_bx_bp = ((qbp*(d_Ifp_dV_bx_bp-d_Irp_dV_bx_bp)-(Ifp-Irp)*d_qbp_dV_bx_bp)/qbp/qbp);
d_Iccp_dTemp_dt_GND = ((qbp*(d_Ifp_dTemp_dt_GND-d_Irp_dTemp_dt_GND)-(Ifp-Irp)*d_qbp_dTemp_dt_GND)/qbp/qbp);
Iccp = ((Ifp-Irp)/qbp);
}
else
{

d_Ifp_dTemp_dt_GND = d_Ifp_dV_bx_bp = d_Ifp_dV_bi_ci = d_Ifp_dV_bi_ei =  0.0;
Ifp = 0.0;

d_qbp_dV_bx_bp = d_qbp_dV_bi_ei = d_qbp_dTemp_dt_GND = d_qbp_dV_bi_ci =  0.0;
qbp = 1.0;

d_Iccp_dTemp_dt_GND = d_Iccp_dV_bx_bp = d_Iccp_dV_bi_ci = d_Iccp_dV_bi_ei = d_Iccp_dV_si_bp =  0.0;
Iccp = 0.0;
}
if (((model_.wbe)==1.0))
{

d_afac_dTemp_dt_GND = (-(model_.nei)*d_vtv_dTemp_dt_GND/((model_.nei)*vtv)/((model_.nei)*vtv));
afac = (1.0/((model_.nei)*vtv));
if ((Vbei<maxvIbei))
{
{
double value_exp_0 = exp((Vbei*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ci =  0.0;
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(Vbei*d_afac_dTemp_dt_GND));
d_expi_dV_bi_ei = (deriv_exp_0_d0*(d_Vbei_dV_bi_ei*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbei*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ci =  0.0;
d_expi_dV_bi_ei = value_exp_0*d_Vbei_dV_bi_ei*afac;
d_expi_dTemp_dt_GND = (value_exp_0*(Vbei-maxvIbei)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIbei*d_afac_dTemp_dt_GND))*(1.0+((Vbei-maxvIbei)*afac)));
expi = (value_exp_0*(1.0+((Vbei-maxvIbei)*afac)));
}
}

d_afac_dTemp_dt_GND = (-(model_.nen)*d_vtv_dTemp_dt_GND/((model_.nen)*vtv)/((model_.nen)*vtv));
afac = (1.0/((model_.nen)*vtv));
if ((Vbei<maxvIben))
{
{
double value_exp_0 = exp((Vbei*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bx_bp = d_expn_dV_bi_ci = d_expn_dV_bx_ei =  0.0;
d_expn_dTemp_dt_GND = (deriv_exp_0_d0*(Vbei*d_afac_dTemp_dt_GND));
d_expn_dV_bi_ei = (deriv_exp_0_d0*(d_Vbei_dV_bi_ei*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIben*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bx_bp = d_expn_dV_bi_ci = d_expn_dV_bx_ei =  0.0;
d_expn_dV_bi_ei = value_exp_0*d_Vbei_dV_bi_ei*afac;
d_expn_dTemp_dt_GND = (value_exp_0*(Vbei-maxvIben)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIben*d_afac_dTemp_dt_GND))*(1.0+((Vbei-maxvIben)*afac)));
expn = (value_exp_0*(1.0+((Vbei-maxvIben)*afac)));
}
}
if (((model_.qnibeir)>0.0))
{

d_Ibe_dV_bx_ei =  0.0;
d_Ibe_dV_bx_bp = ((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*d_expi_dV_bx_bp+iben_t*d_expn_dV_bx_bp);
d_Ibe_dV_si_bp = ((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*d_expi_dV_si_bp+iben_t*d_expn_dV_si_bp);
d_Ibe_dV_bi_ci = (((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*d_expi_dV_bi_ci+ibei_t*(model_.qnibeir)*d_q1_dV_bi_ci*(expi-1.0))+iben_t*d_expn_dV_bi_ci);
d_Ibe_dV_bi_ei = (((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*d_expi_dV_bi_ei+ibei_t*(model_.qnibeir)*d_q1_dV_bi_ei*(expi-1.0))+iben_t*d_expn_dV_bi_ei);
d_Ibe_dTemp_dt_GND = (((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*d_expi_dTemp_dt_GND+(ibei_t*(model_.qnibeir)*d_q1_dTemp_dt_GND+d_ibei_t_dTemp_dt_GND*(1.0+((model_.qnibeir)*(q1-1.0))))*(expi-1.0))+(iben_t*d_expn_dTemp_dt_GND+d_iben_t_dTemp_dt_GND*(expn-1.0)));
Ibe = (((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*(expi-1.0))+(iben_t*(expn-1.0)));
}
else
{

d_Ibe_dV_bx_ei =  0.0;
d_Ibe_dV_bi_ei = (ibei_t*d_expi_dV_bi_ei+iben_t*d_expn_dV_bi_ei);
d_Ibe_dV_bi_ci = (ibei_t*d_expi_dV_bi_ci+iben_t*d_expn_dV_bi_ci);
d_Ibe_dV_bx_bp = (ibei_t*d_expi_dV_bx_bp+iben_t*d_expn_dV_bx_bp);
d_Ibe_dV_si_bp = (ibei_t*d_expi_dV_si_bp+iben_t*d_expn_dV_si_bp);
d_Ibe_dTemp_dt_GND = ((ibei_t*d_expi_dTemp_dt_GND+d_ibei_t_dTemp_dt_GND*(expi-1.0))+(iben_t*d_expn_dTemp_dt_GND+d_iben_t_dTemp_dt_GND*(expn-1.0)));
Ibe = ((ibei_t*(expi-1.0))+(iben_t*(expn-1.0)));
}
if (((model_.vbbe)>0.0))
{

d_Bvbe_dV_bi_ei = (-d_Vbei_dV_bi_ei);
d_Bvbe_dTemp_dt_GND = (-d_vbbe_t_dTemp_dt_GND);
Bvbe = ((-vbbe_t)-Vbei);

d_afac_dTemp_dt_GND = (-(nbbe_t*d_vtv_dTemp_dt_GND+d_nbbe_t_dTemp_dt_GND*vtv)/(nbbe_t*vtv)/(nbbe_t*vtv));
afac = (1.0/(nbbe_t*vtv));
if ((Bvbe<maxvIbbe))
{
{
double value_exp_0 = exp((Bvbe*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expx_dV_bi_cx = d_expx_dV_bx_bp = d_expx_dV_bi_ci =  0.0;
d_expx_dV_bi_ei = (deriv_exp_0_d0*(d_Bvbe_dV_bi_ei*afac));
d_expx_dTemp_dt_GND = (deriv_exp_0_d0*((Bvbe*d_afac_dTemp_dt_GND+d_Bvbe_dTemp_dt_GND*afac)));
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbbe*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expx_dV_bi_cx = d_expx_dV_bx_bp = d_expx_dV_bi_ci =  0.0;
d_expx_dV_bi_ei = value_exp_0*d_Bvbe_dV_bi_ei*afac;
d_expx_dTemp_dt_GND = (value_exp_0*((Bvbe-maxvIbbe)*d_afac_dTemp_dt_GND+d_Bvbe_dTemp_dt_GND*afac)+(deriv_exp_0_d0*(maxvIbbe*d_afac_dTemp_dt_GND))*(1.0+((Bvbe-maxvIbbe)*afac)));
expx = (value_exp_0*(1.0+((Bvbe-maxvIbbe)*afac)));
}
}

d_Ibe_dV_bx_ei =  0.0;
d_Ibe_dV_bx_bp = (d_Ibe_dV_bx_bp-(model_.ibbe)*d_expx_dV_bx_bp);
d_Ibe_dV_bi_ci = (d_Ibe_dV_bi_ci-(model_.ibbe)*d_expx_dV_bi_ci);
d_Ibe_dV_bi_ei = (d_Ibe_dV_bi_ei-(model_.ibbe)*d_expx_dV_bi_ei);
d_Ibe_dTemp_dt_GND = (d_Ibe_dTemp_dt_GND-(model_.ibbe)*(d_expx_dTemp_dt_GND-d_ebbe_t_dTemp_dt_GND));
Ibe = (Ibe-((model_.ibbe)*(expx-ebbe_t)));
}

d_Ibex_dTemp_dt_GND = d_Ibex_dV_bx_ei = d_Ibex_dV_si_bp = d_Ibex_dV_bx_bp = d_Ibex_dV_bi_ci = d_Ibex_dV_bi_ei =  0.0;
Ibex = 0.0;
}
else
{
if (((model_.wbe)==0.0))
{

d_Ibe_dV_bx_ei = d_Ibe_dTemp_dt_GND = d_Ibe_dV_bi_ei = d_Ibe_dV_bi_ci = d_Ibe_dV_si_bp = d_Ibe_dV_bx_bp =  0.0;
Ibe = 0.0;

d_afac_dTemp_dt_GND = (-(model_.nei)*d_vtv_dTemp_dt_GND/((model_.nei)*vtv)/((model_.nei)*vtv));
afac = (1.0/((model_.nei)*vtv));
if ((Vbex<maxvIbei))
{
{
double value_exp_0 = exp((Vbex*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(Vbex*d_afac_dTemp_dt_GND));
d_expi_dV_bx_ei = (deriv_exp_0_d0*(d_Vbex_dV_bx_ei*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbei*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dV_bx_ei = value_exp_0*d_Vbex_dV_bx_ei*afac;
d_expi_dTemp_dt_GND = (value_exp_0*(Vbex-maxvIbei)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIbei*d_afac_dTemp_dt_GND))*(1.0+((Vbex-maxvIbei)*afac)));
expi = (value_exp_0*(1.0+((Vbex-maxvIbei)*afac)));
}
}

d_afac_dTemp_dt_GND = (-(model_.nen)*d_vtv_dTemp_dt_GND/((model_.nen)*vtv)/((model_.nen)*vtv));
afac = (1.0/((model_.nen)*vtv));
if ((Vbex<maxvIben))
{
{
double value_exp_0 = exp((Vbex*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bx_bp = d_expn_dV_bi_ci = d_expn_dV_bi_ei =  0.0;
d_expn_dTemp_dt_GND = (deriv_exp_0_d0*(Vbex*d_afac_dTemp_dt_GND));
d_expn_dV_bx_ei = (deriv_exp_0_d0*(d_Vbex_dV_bx_ei*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIben*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bx_bp = d_expn_dV_bi_ci = d_expn_dV_bi_ei =  0.0;
d_expn_dV_bx_ei = value_exp_0*d_Vbex_dV_bx_ei*afac;
d_expn_dTemp_dt_GND = (value_exp_0*(Vbex-maxvIben)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIben*d_afac_dTemp_dt_GND))*(1.0+((Vbex-maxvIben)*afac)));
expn = (value_exp_0*(1.0+((Vbex-maxvIben)*afac)));
}
}

d_Ibex_dV_bi_ei = (ibei_t*d_expi_dV_bi_ei+iben_t*d_expn_dV_bi_ei);
d_Ibex_dV_bi_ci = (ibei_t*d_expi_dV_bi_ci+iben_t*d_expn_dV_bi_ci);
d_Ibex_dV_bx_bp = (ibei_t*d_expi_dV_bx_bp+iben_t*d_expn_dV_bx_bp);
d_Ibex_dV_si_bp = (ibei_t*d_expi_dV_si_bp+iben_t*d_expn_dV_si_bp);
d_Ibex_dV_bx_ei = (ibei_t*d_expi_dV_bx_ei+iben_t*d_expn_dV_bx_ei);
d_Ibex_dTemp_dt_GND = ((ibei_t*d_expi_dTemp_dt_GND+d_ibei_t_dTemp_dt_GND*(expi-1.0))+(iben_t*d_expn_dTemp_dt_GND+d_iben_t_dTemp_dt_GND*(expn-1.0)));
Ibex = ((ibei_t*(expi-1.0))+(iben_t*(expn-1.0)));
if (((model_.vbbe)>0.0))
{

d_Bvbe_dV_bi_ei = (-d_Vbei_dV_bi_ei);
d_Bvbe_dTemp_dt_GND = (-d_vbbe_t_dTemp_dt_GND);
Bvbe = ((-vbbe_t)-Vbei);

d_afac_dTemp_dt_GND = (-(nbbe_t*d_vtv_dTemp_dt_GND+d_nbbe_t_dTemp_dt_GND*vtv)/(nbbe_t*vtv)/(nbbe_t*vtv));
afac = (1.0/(nbbe_t*vtv));
if ((Bvbe<maxvIbbe))
{
{
double value_exp_0 = exp((Bvbe*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expx_dV_bi_cx = d_expx_dV_bx_bp = d_expx_dV_bi_ci =  0.0;
d_expx_dV_bi_ei = (deriv_exp_0_d0*(d_Bvbe_dV_bi_ei*afac));
d_expx_dTemp_dt_GND = (deriv_exp_0_d0*((Bvbe*d_afac_dTemp_dt_GND+d_Bvbe_dTemp_dt_GND*afac)));
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbbe*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expx_dV_bi_cx = d_expx_dV_bx_bp = d_expx_dV_bi_ci =  0.0;
d_expx_dV_bi_ei = value_exp_0*d_Bvbe_dV_bi_ei*afac;
d_expx_dTemp_dt_GND = (value_exp_0*((Bvbe-maxvIbbe)*d_afac_dTemp_dt_GND+d_Bvbe_dTemp_dt_GND*afac)+(deriv_exp_0_d0*(maxvIbbe*d_afac_dTemp_dt_GND))*(1.0+((Bvbe-maxvIbbe)*afac)));
expx = (value_exp_0*(1.0+((Bvbe-maxvIbbe)*afac)));
}
}

d_Ibex_dV_bi_ei = (d_Ibex_dV_bi_ei-(model_.ibbe)*d_expx_dV_bi_ei);
d_Ibex_dV_bi_ci = (d_Ibex_dV_bi_ci-(model_.ibbe)*d_expx_dV_bi_ci);
d_Ibex_dV_bx_bp = (d_Ibex_dV_bx_bp-(model_.ibbe)*d_expx_dV_bx_bp);
d_Ibex_dTemp_dt_GND = (d_Ibex_dTemp_dt_GND-(model_.ibbe)*(d_expx_dTemp_dt_GND-d_ebbe_t_dTemp_dt_GND));
Ibex = (Ibex-((model_.ibbe)*(expx-ebbe_t)));
}
}
else
{

d_afac_dTemp_dt_GND = (-(model_.nei)*d_vtv_dTemp_dt_GND/((model_.nei)*vtv)/((model_.nei)*vtv));
afac = (1.0/((model_.nei)*vtv));
if ((Vbei<maxvIbei))
{
{
double value_exp_0 = exp((Vbei*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ci =  0.0;
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(Vbei*d_afac_dTemp_dt_GND));
d_expi_dV_bi_ei = (deriv_exp_0_d0*(d_Vbei_dV_bi_ei*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbei*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ci =  0.0;
d_expi_dV_bi_ei = value_exp_0*d_Vbei_dV_bi_ei*afac;
d_expi_dTemp_dt_GND = (value_exp_0*(Vbei-maxvIbei)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIbei*d_afac_dTemp_dt_GND))*(1.0+((Vbei-maxvIbei)*afac)));
expi = (value_exp_0*(1.0+((Vbei-maxvIbei)*afac)));
}
}

d_afac_dTemp_dt_GND = (-(model_.nen)*d_vtv_dTemp_dt_GND/((model_.nen)*vtv)/((model_.nen)*vtv));
afac = (1.0/((model_.nen)*vtv));
if ((Vbei<maxvIben))
{
{
double value_exp_0 = exp((Vbei*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bx_bp = d_expn_dV_bi_ci = d_expn_dV_bx_ei =  0.0;
d_expn_dTemp_dt_GND = (deriv_exp_0_d0*(Vbei*d_afac_dTemp_dt_GND));
d_expn_dV_bi_ei = (deriv_exp_0_d0*(d_Vbei_dV_bi_ei*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIben*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bx_bp = d_expn_dV_bi_ci = d_expn_dV_bx_ei =  0.0;
d_expn_dV_bi_ei = value_exp_0*d_Vbei_dV_bi_ei*afac;
d_expn_dTemp_dt_GND = (value_exp_0*(Vbei-maxvIben)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIben*d_afac_dTemp_dt_GND))*(1.0+((Vbei-maxvIben)*afac)));
expn = (value_exp_0*(1.0+((Vbei-maxvIben)*afac)));
}
}
if (((model_.qnibeir)>0.0))
{

d_Ibe_dV_bx_bp = (model_.wbe)*((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*d_expi_dV_bx_bp+iben_t*d_expn_dV_bx_bp);
d_Ibe_dV_si_bp = (model_.wbe)*((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*d_expi_dV_si_bp+iben_t*d_expn_dV_si_bp);
d_Ibe_dV_bx_ei = (model_.wbe)*((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*d_expi_dV_bx_ei+iben_t*d_expn_dV_bx_ei);
d_Ibe_dV_bi_ci = (model_.wbe)*(((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*d_expi_dV_bi_ci+ibei_t*(model_.qnibeir)*d_q1_dV_bi_ci*(expi-1.0))+iben_t*d_expn_dV_bi_ci);
d_Ibe_dV_bi_ei = (model_.wbe)*(((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*d_expi_dV_bi_ei+ibei_t*(model_.qnibeir)*d_q1_dV_bi_ei*(expi-1.0))+iben_t*d_expn_dV_bi_ei);
d_Ibe_dTemp_dt_GND = (model_.wbe)*(((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*d_expi_dTemp_dt_GND+(ibei_t*(model_.qnibeir)*d_q1_dTemp_dt_GND+d_ibei_t_dTemp_dt_GND*(1.0+((model_.qnibeir)*(q1-1.0))))*(expi-1.0))+(iben_t*d_expn_dTemp_dt_GND+d_iben_t_dTemp_dt_GND*(expn-1.0)));
Ibe = ((model_.wbe)*(((ibei_t*(1.0+((model_.qnibeir)*(q1-1.0))))*(expi-1.0))+(iben_t*(expn-1.0))));
}
else
{

d_Ibe_dV_bi_ei = (model_.wbe)*(ibei_t*d_expi_dV_bi_ei+iben_t*d_expn_dV_bi_ei);
d_Ibe_dV_bi_ci = (model_.wbe)*(ibei_t*d_expi_dV_bi_ci+iben_t*d_expn_dV_bi_ci);
d_Ibe_dV_bx_bp = (model_.wbe)*(ibei_t*d_expi_dV_bx_bp+iben_t*d_expn_dV_bx_bp);
d_Ibe_dV_si_bp = (model_.wbe)*(ibei_t*d_expi_dV_si_bp+iben_t*d_expn_dV_si_bp);
d_Ibe_dV_bx_ei = (model_.wbe)*(ibei_t*d_expi_dV_bx_ei+iben_t*d_expn_dV_bx_ei);
d_Ibe_dTemp_dt_GND = (model_.wbe)*((ibei_t*d_expi_dTemp_dt_GND+d_ibei_t_dTemp_dt_GND*(expi-1.0))+(iben_t*d_expn_dTemp_dt_GND+d_iben_t_dTemp_dt_GND*(expn-1.0)));
Ibe = ((model_.wbe)*((ibei_t*(expi-1.0))+(iben_t*(expn-1.0))));
}
if (((model_.vbbe)>0.0))
{

d_Bvbe_dV_bi_ei = (-d_Vbei_dV_bi_ei);
d_Bvbe_dTemp_dt_GND = (-d_vbbe_t_dTemp_dt_GND);
Bvbe = ((-vbbe_t)-Vbei);

d_afac_dTemp_dt_GND = (-(nbbe_t*d_vtv_dTemp_dt_GND+d_nbbe_t_dTemp_dt_GND*vtv)/(nbbe_t*vtv)/(nbbe_t*vtv));
afac = (1.0/(nbbe_t*vtv));
if ((Bvbe<maxvIbbe))
{
{
double value_exp_0 = exp((Bvbe*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expx_dV_bi_cx = d_expx_dV_bx_bp = d_expx_dV_bi_ci =  0.0;
d_expx_dV_bi_ei = (deriv_exp_0_d0*(d_Bvbe_dV_bi_ei*afac));
d_expx_dTemp_dt_GND = (deriv_exp_0_d0*((Bvbe*d_afac_dTemp_dt_GND+d_Bvbe_dTemp_dt_GND*afac)));
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbbe*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expx_dV_bi_cx = d_expx_dV_bx_bp = d_expx_dV_bi_ci =  0.0;
d_expx_dV_bi_ei = value_exp_0*d_Bvbe_dV_bi_ei*afac;
d_expx_dTemp_dt_GND = (value_exp_0*((Bvbe-maxvIbbe)*d_afac_dTemp_dt_GND+d_Bvbe_dTemp_dt_GND*afac)+(deriv_exp_0_d0*(maxvIbbe*d_afac_dTemp_dt_GND))*(1.0+((Bvbe-maxvIbbe)*afac)));
expx = (value_exp_0*(1.0+((Bvbe-maxvIbbe)*afac)));
}
}

d_Ibe_dV_bx_bp = (d_Ibe_dV_bx_bp-((model_.wbe)*(model_.ibbe))*d_expx_dV_bx_bp);
d_Ibe_dV_bi_ci = (d_Ibe_dV_bi_ci-((model_.wbe)*(model_.ibbe))*d_expx_dV_bi_ci);
d_Ibe_dV_bi_ei = (d_Ibe_dV_bi_ei-((model_.wbe)*(model_.ibbe))*d_expx_dV_bi_ei);
d_Ibe_dTemp_dt_GND = (d_Ibe_dTemp_dt_GND-((model_.wbe)*(model_.ibbe))*(d_expx_dTemp_dt_GND-d_ebbe_t_dTemp_dt_GND));
Ibe = (Ibe-(((model_.wbe)*(model_.ibbe))*(expx-ebbe_t)));
}

d_afac_dTemp_dt_GND = (-(model_.nei)*d_vtv_dTemp_dt_GND/((model_.nei)*vtv)/((model_.nei)*vtv));
afac = (1.0/((model_.nei)*vtv));
if ((Vbex<maxvIbei))
{
{
double value_exp_0 = exp((Vbex*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(Vbex*d_afac_dTemp_dt_GND));
d_expi_dV_bx_ei = (deriv_exp_0_d0*(d_Vbex_dV_bx_ei*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbei*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dV_bx_ei = value_exp_0*d_Vbex_dV_bx_ei*afac;
d_expi_dTemp_dt_GND = (value_exp_0*(Vbex-maxvIbei)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIbei*d_afac_dTemp_dt_GND))*(1.0+((Vbex-maxvIbei)*afac)));
expi = (value_exp_0*(1.0+((Vbex-maxvIbei)*afac)));
}
}

d_afac_dTemp_dt_GND = (-(model_.nen)*d_vtv_dTemp_dt_GND/((model_.nen)*vtv)/((model_.nen)*vtv));
afac = (1.0/((model_.nen)*vtv));
if ((Vbex<maxvIben))
{
{
double value_exp_0 = exp((Vbex*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bx_bp = d_expn_dV_bi_ci = d_expn_dV_bi_ei =  0.0;
d_expn_dTemp_dt_GND = (deriv_exp_0_d0*(Vbex*d_afac_dTemp_dt_GND));
d_expn_dV_bx_ei = (deriv_exp_0_d0*(d_Vbex_dV_bx_ei*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIben*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bx_bp = d_expn_dV_bi_ci = d_expn_dV_bi_ei =  0.0;
d_expn_dV_bx_ei = value_exp_0*d_Vbex_dV_bx_ei*afac;
d_expn_dTemp_dt_GND = (value_exp_0*(Vbex-maxvIben)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIben*d_afac_dTemp_dt_GND))*(1.0+((Vbex-maxvIben)*afac)));
expn = (value_exp_0*(1.0+((Vbex-maxvIben)*afac)));
}
}

d_Ibex_dV_bi_ei = (1.0-(model_.wbe))*(ibei_t*d_expi_dV_bi_ei+iben_t*d_expn_dV_bi_ei);
d_Ibex_dV_bi_ci = (1.0-(model_.wbe))*(ibei_t*d_expi_dV_bi_ci+iben_t*d_expn_dV_bi_ci);
d_Ibex_dV_bx_bp = (1.0-(model_.wbe))*(ibei_t*d_expi_dV_bx_bp+iben_t*d_expn_dV_bx_bp);
d_Ibex_dV_si_bp = (1.0-(model_.wbe))*(ibei_t*d_expi_dV_si_bp+iben_t*d_expn_dV_si_bp);
d_Ibex_dV_bx_ei = (1.0-(model_.wbe))*(ibei_t*d_expi_dV_bx_ei+iben_t*d_expn_dV_bx_ei);
d_Ibex_dTemp_dt_GND = (1.0-(model_.wbe))*((ibei_t*d_expi_dTemp_dt_GND+d_ibei_t_dTemp_dt_GND*(expi-1.0))+(iben_t*d_expn_dTemp_dt_GND+d_iben_t_dTemp_dt_GND*(expn-1.0)));
Ibex = ((1.0-(model_.wbe))*((ibei_t*(expi-1.0))+(iben_t*(expn-1.0))));
if (((model_.vbbe)>0.0))
{

d_Bvbe_dV_bi_ei = (-d_Vbei_dV_bi_ei);
d_Bvbe_dTemp_dt_GND = (-d_vbbe_t_dTemp_dt_GND);
Bvbe = ((-vbbe_t)-Vbei);

d_afac_dTemp_dt_GND = (-(nbbe_t*d_vtv_dTemp_dt_GND+d_nbbe_t_dTemp_dt_GND*vtv)/(nbbe_t*vtv)/(nbbe_t*vtv));
afac = (1.0/(nbbe_t*vtv));
if ((Bvbe<maxvIbbe))
{
{
double value_exp_0 = exp((Bvbe*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expx_dV_bi_cx = d_expx_dV_bx_bp = d_expx_dV_bi_ci =  0.0;
d_expx_dV_bi_ei = (deriv_exp_0_d0*(d_Bvbe_dV_bi_ei*afac));
d_expx_dTemp_dt_GND = (deriv_exp_0_d0*((Bvbe*d_afac_dTemp_dt_GND+d_Bvbe_dTemp_dt_GND*afac)));
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbbe*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expx_dV_bi_cx = d_expx_dV_bx_bp = d_expx_dV_bi_ci =  0.0;
d_expx_dV_bi_ei = value_exp_0*d_Bvbe_dV_bi_ei*afac;
d_expx_dTemp_dt_GND = (value_exp_0*((Bvbe-maxvIbbe)*d_afac_dTemp_dt_GND+d_Bvbe_dTemp_dt_GND*afac)+(deriv_exp_0_d0*(maxvIbbe*d_afac_dTemp_dt_GND))*(1.0+((Bvbe-maxvIbbe)*afac)));
expx = (value_exp_0*(1.0+((Bvbe-maxvIbbe)*afac)));
}
}

d_Ibex_dV_bi_ei = (d_Ibex_dV_bi_ei-((1.0-(model_.wbe))*(model_.ibbe))*d_expx_dV_bi_ei);
d_Ibex_dV_bi_ci = (d_Ibex_dV_bi_ci-((1.0-(model_.wbe))*(model_.ibbe))*d_expx_dV_bi_ci);
d_Ibex_dV_bx_bp = (d_Ibex_dV_bx_bp-((1.0-(model_.wbe))*(model_.ibbe))*d_expx_dV_bx_bp);
d_Ibex_dTemp_dt_GND = (d_Ibex_dTemp_dt_GND-((1.0-(model_.wbe))*(model_.ibbe))*(d_expx_dTemp_dt_GND-d_ebbe_t_dTemp_dt_GND));
Ibex = (Ibex-(((1.0-(model_.wbe))*(model_.ibbe))*(expx-ebbe_t)));
}
}
}

d_afac_dTemp_dt_GND = (-(model_.nci)*d_vtv_dTemp_dt_GND/((model_.nci)*vtv)/((model_.nci)*vtv));
afac = (1.0/((model_.nci)*vtv));
if ((Vbci<maxvIbci))
{
{
double value_exp_0 = exp((Vbci*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ei =  0.0;
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(Vbci*d_afac_dTemp_dt_GND));
d_expi_dV_bi_ci = (deriv_exp_0_d0*(d_Vbci_dV_bi_ci*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbci*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bx_bp = d_expi_dV_bi_ei =  0.0;
d_expi_dV_bi_ci = value_exp_0*d_Vbci_dV_bi_ci*afac;
d_expi_dTemp_dt_GND = (value_exp_0*(Vbci-maxvIbci)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIbci*d_afac_dTemp_dt_GND))*(1.0+((Vbci-maxvIbci)*afac)));
expi = (value_exp_0*(1.0+((Vbci-maxvIbci)*afac)));
}
}

d_afac_dTemp_dt_GND = (-(model_.ncn)*d_vtv_dTemp_dt_GND/((model_.ncn)*vtv)/((model_.ncn)*vtv));
afac = (1.0/((model_.ncn)*vtv));
if ((Vbci<maxvIbcn))
{
{
double value_exp_0 = exp((Vbci*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bx_bp = d_expn_dV_bx_ei = d_expn_dV_bi_ei =  0.0;
d_expn_dTemp_dt_GND = (deriv_exp_0_d0*(Vbci*d_afac_dTemp_dt_GND));
d_expn_dV_bi_ci = (deriv_exp_0_d0*(d_Vbci_dV_bi_ci*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbcn*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bx_bp = d_expn_dV_bx_ei = d_expn_dV_bi_ei =  0.0;
d_expn_dV_bi_ci = value_exp_0*d_Vbci_dV_bi_ci*afac;
d_expn_dTemp_dt_GND = (value_exp_0*(Vbci-maxvIbcn)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIbcn*d_afac_dTemp_dt_GND))*(1.0+((Vbci-maxvIbcn)*afac)));
expn = (value_exp_0*(1.0+((Vbci-maxvIbcn)*afac)));
}
}

d_Ibcj_dV_bi_ei = (ibci_t*d_expi_dV_bi_ei+ibcn_t*d_expn_dV_bi_ei);
d_Ibcj_dV_bi_ci = (ibci_t*d_expi_dV_bi_ci+ibcn_t*d_expn_dV_bi_ci);
d_Ibcj_dV_bx_bp = (ibci_t*d_expi_dV_bx_bp+ibcn_t*d_expn_dV_bx_bp);
d_Ibcj_dV_si_bp = (ibci_t*d_expi_dV_si_bp+ibcn_t*d_expn_dV_si_bp);
d_Ibcj_dV_bx_ei = (ibci_t*d_expi_dV_bx_ei+ibcn_t*d_expn_dV_bx_ei);
d_Ibcj_dTemp_dt_GND = ((ibci_t*d_expi_dTemp_dt_GND+d_ibci_t_dTemp_dt_GND*(expi-1.0))+(ibcn_t*d_expn_dTemp_dt_GND+d_ibcn_t_dTemp_dt_GND*(expn-1.0)));
Ibcj = ((ibci_t*(expi-1.0))+(ibcn_t*(expn-1.0)));
if ((((model_.ibeip)>0.0)||((model_.ibenp)>0.0)))
{

d_afac_dTemp_dt_GND = (-(model_.nci)*d_vtv_dTemp_dt_GND/((model_.nci)*vtv)/((model_.nci)*vtv));
afac = (1.0/((model_.nci)*vtv));
if ((Vbep<maxvIbeip))
{
{
double value_exp_0 = exp((Vbep*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(Vbep*d_afac_dTemp_dt_GND));
d_expi_dV_bx_bp = (deriv_exp_0_d0*(d_Vbep_dV_bx_bp*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbeip*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dV_bx_bp = value_exp_0*d_Vbep_dV_bx_bp*afac;
d_expi_dTemp_dt_GND = (value_exp_0*(Vbep-maxvIbeip)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIbeip*d_afac_dTemp_dt_GND))*(1.0+((Vbep-maxvIbeip)*afac)));
expi = (value_exp_0*(1.0+((Vbep-maxvIbeip)*afac)));
}
}

d_afac_dTemp_dt_GND = (-(model_.ncn)*d_vtv_dTemp_dt_GND/((model_.ncn)*vtv)/((model_.ncn)*vtv));
afac = (1.0/((model_.ncn)*vtv));
if ((Vbep<maxvIbenp))
{
{
double value_exp_0 = exp((Vbep*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bi_ci = d_expn_dV_bx_ei = d_expn_dV_bi_ei =  0.0;
d_expn_dTemp_dt_GND = (deriv_exp_0_d0*(Vbep*d_afac_dTemp_dt_GND));
d_expn_dV_bx_bp = (deriv_exp_0_d0*(d_Vbep_dV_bx_bp*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbenp*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_si_bp = d_expn_dV_bi_ci = d_expn_dV_bx_ei = d_expn_dV_bi_ei =  0.0;
d_expn_dV_bx_bp = value_exp_0*d_Vbep_dV_bx_bp*afac;
d_expn_dTemp_dt_GND = (value_exp_0*(Vbep-maxvIbenp)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIbenp*d_afac_dTemp_dt_GND))*(1.0+((Vbep-maxvIbenp)*afac)));
expn = (value_exp_0*(1.0+((Vbep-maxvIbenp)*afac)));
}
}

d_Ibep_dV_bi_ei = (ibeip_t*d_expi_dV_bi_ei+ibenp_t*d_expn_dV_bi_ei);
d_Ibep_dV_bi_ci = (ibeip_t*d_expi_dV_bi_ci+ibenp_t*d_expn_dV_bi_ci);
d_Ibep_dV_bx_bp = (ibeip_t*d_expi_dV_bx_bp+ibenp_t*d_expn_dV_bx_bp);
d_Ibep_dV_si_bp = (ibeip_t*d_expi_dV_si_bp+ibenp_t*d_expn_dV_si_bp);
d_Ibep_dV_bx_ei = (ibeip_t*d_expi_dV_bx_ei+ibenp_t*d_expn_dV_bx_ei);
d_Ibep_dTemp_dt_GND = ((ibeip_t*d_expi_dTemp_dt_GND+d_ibeip_t_dTemp_dt_GND*(expi-1.0))+(ibenp_t*d_expn_dTemp_dt_GND+d_ibenp_t_dTemp_dt_GND*(expn-1.0)));
Ibep = ((ibeip_t*(expi-1.0))+(ibenp_t*(expn-1.0)));
}
else
{

d_Ibep_dTemp_dt_GND = d_Ibep_dV_bx_ei = d_Ibep_dV_si_bp = d_Ibep_dV_bx_bp = d_Ibep_dV_bi_ci = d_Ibep_dV_bi_ei =  0.0;
Ibep = 0.0;
}

d_arg_dV_bi_cx = d_arg_dV_bx_bp = d_arg_dV_bi_ei =  0.0;
d_arg_dTemp_dt_GND = (-Vbci*d_vtv_dTemp_dt_GND/vtv/vtv);
d_arg_dV_bi_ci = (d_Vbci_dV_bi_ci/vtv);
arg = (Vbci/vtv);
if ((arg<(model_.VmaxExp)))
{
{
double value_exp_0 = exp(arg);
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp =  0.0;
d_expi_dV_bi_ci = (deriv_exp_0_d0*(d_arg_dV_bi_ci));
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(d_arg_dTemp_dt_GND));
d_expi_dV_bi_ei = (deriv_exp_0_d0*(d_arg_dV_bi_ei));
d_expi_dV_bx_bp = (deriv_exp_0_d0*(d_arg_dV_bx_bp));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((model_.VmaxExp));

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_si_bp =  0.0;
d_expi_dV_bi_ci = value_exp_0*d_arg_dV_bi_ci;
d_expi_dTemp_dt_GND = value_exp_0*d_arg_dTemp_dt_GND;
d_expi_dV_bi_ei = value_exp_0*d_arg_dV_bi_ei;
d_expi_dV_bx_bp = value_exp_0*d_arg_dV_bx_bp;
expi = (value_exp_0*(1.0+(arg-(model_.VmaxExp))));
}
}

d_arg_dV_bx_bp = d_arg_dV_bi_ei = d_arg_dV_bi_ci =  0.0;
d_arg_dTemp_dt_GND = (-Vbcx*d_vtv_dTemp_dt_GND/vtv/vtv);
d_arg_dV_bi_cx = (d_Vbcx_dV_bi_cx/vtv);
arg = (Vbcx/vtv);
if ((arg<(model_.VmaxExp)))
{
{
double value_exp_0 = exp(arg);
double  deriv_exp_0_d0 = value_exp_0;

d_expx_dV_bi_ci = (deriv_exp_0_d0*(d_arg_dV_bi_ci));
d_expx_dTemp_dt_GND = (deriv_exp_0_d0*(d_arg_dTemp_dt_GND));
d_expx_dV_bi_ei = (deriv_exp_0_d0*(d_arg_dV_bi_ei));
d_expx_dV_bx_bp = (deriv_exp_0_d0*(d_arg_dV_bx_bp));
d_expx_dV_bi_cx = (deriv_exp_0_d0*(d_arg_dV_bi_cx));
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((model_.VmaxExp));

d_expx_dV_bi_ci = value_exp_0*d_arg_dV_bi_ci;
d_expx_dTemp_dt_GND = value_exp_0*d_arg_dTemp_dt_GND;
d_expx_dV_bi_ei = value_exp_0*d_arg_dV_bi_ei;
d_expx_dV_bx_bp = value_exp_0*d_arg_dV_bx_bp;
d_expx_dV_bi_cx = value_exp_0*d_arg_dV_bi_cx;
expx = (value_exp_0*(1.0+(arg-(model_.VmaxExp))));
}
}
{
double value_sqrt_0 = sqrt((1.0+(gamm_t*expi)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_Kbci_dV_bi_ei = (deriv_sqrt_0_d0*(gamm_t*d_expi_dV_bi_ei));
d_Kbci_dV_bi_ci = (deriv_sqrt_0_d0*(gamm_t*d_expi_dV_bi_ci));
d_Kbci_dV_bx_bp = (deriv_sqrt_0_d0*(gamm_t*d_expi_dV_bx_bp));
d_Kbci_dV_si_bp = (deriv_sqrt_0_d0*(gamm_t*d_expi_dV_si_bp));
d_Kbci_dV_bx_ei = (deriv_sqrt_0_d0*(gamm_t*d_expi_dV_bx_ei));
d_Kbci_dTemp_dt_GND = (deriv_sqrt_0_d0*((gamm_t*d_expi_dTemp_dt_GND+d_gamm_t_dTemp_dt_GND*expi)));
Kbci = value_sqrt_0;
}
{
double value_sqrt_0 = sqrt((1.0+(gamm_t*expx)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_Kbcx_dV_bi_ci = (deriv_sqrt_0_d0*(gamm_t*d_expx_dV_bi_ci));
d_Kbcx_dV_bi_ei = (deriv_sqrt_0_d0*(gamm_t*d_expx_dV_bi_ei));
d_Kbcx_dV_bx_bp = (deriv_sqrt_0_d0*(gamm_t*d_expx_dV_bx_bp));
d_Kbcx_dV_bi_cx = (deriv_sqrt_0_d0*(gamm_t*d_expx_dV_bi_cx));
d_Kbcx_dTemp_dt_GND = (deriv_sqrt_0_d0*((gamm_t*d_expx_dTemp_dt_GND+d_gamm_t_dTemp_dt_GND*expx)));
Kbcx = value_sqrt_0;
}

d_Ircx_dTemp_dt_GND = Vrcx*d_Gcx_dTemp_dt_GND;
d_Ircx_dV_c_cx = d_Vrcx_dV_c_cx*Gcx;
Ircx = (Vrcx*Gcx);

d_rKp1_dV_bi_cx = (-(Kbci+1.0)*d_Kbcx_dV_bi_cx/(Kbcx+1.0)/(Kbcx+1.0));
d_rKp1_dV_bi_ei = (((Kbcx+1.0)*d_Kbci_dV_bi_ei-(Kbci+1.0)*d_Kbcx_dV_bi_ei)/(Kbcx+1.0)/(Kbcx+1.0));
d_rKp1_dV_bi_ci = (((Kbcx+1.0)*d_Kbci_dV_bi_ci-(Kbci+1.0)*d_Kbcx_dV_bi_ci)/(Kbcx+1.0)/(Kbcx+1.0));
d_rKp1_dV_bx_bp = (((Kbcx+1.0)*d_Kbci_dV_bx_bp-(Kbci+1.0)*d_Kbcx_dV_bx_bp)/(Kbcx+1.0)/(Kbcx+1.0));
d_rKp1_dV_si_bp = (d_Kbci_dV_si_bp/(Kbcx+1.0));
d_rKp1_dV_bx_ei = (d_Kbci_dV_bx_ei/(Kbcx+1.0));
d_rKp1_dTemp_dt_GND = (((Kbcx+1.0)*d_Kbci_dTemp_dt_GND-(Kbci+1.0)*d_Kbcx_dTemp_dt_GND)/(Kbcx+1.0)/(Kbcx+1.0));
rKp1 = ((Kbci+1.0)/(Kbcx+1.0));
{
double value_log_0 = log(rKp1);
double  deriv_log_0_d0 = (1.0/rKp1);

d_Iohm_dV_bi_cx = vtv*((-d_Kbcx_dV_bi_cx)-(deriv_log_0_d0*(d_rKp1_dV_bi_cx)))*Gci;
d_Iohm_dV_bi_ei = vtv*((d_Kbci_dV_bi_ei-d_Kbcx_dV_bi_ei)-(deriv_log_0_d0*(d_rKp1_dV_bi_ei)))*Gci;
d_Iohm_dV_bi_ci = vtv*((d_Kbci_dV_bi_ci-d_Kbcx_dV_bi_ci)-(deriv_log_0_d0*(d_rKp1_dV_bi_ci)))*Gci;
d_Iohm_dV_bx_bp = vtv*((d_Kbci_dV_bx_bp-d_Kbcx_dV_bx_bp)-(deriv_log_0_d0*(d_rKp1_dV_bx_bp)))*Gci;
d_Iohm_dV_si_bp = vtv*(d_Kbci_dV_si_bp-(deriv_log_0_d0*(d_rKp1_dV_si_bp)))*Gci;
d_Iohm_dV_bx_ei = vtv*(d_Kbci_dV_bx_ei-(deriv_log_0_d0*(d_rKp1_dV_bx_ei)))*Gci;
d_Iohm_dTemp_dt_GND = ((Vrci+(vtv*((Kbci-Kbcx)-value_log_0)))*d_Gci_dTemp_dt_GND+(vtv*((d_Kbci_dTemp_dt_GND-d_Kbcx_dTemp_dt_GND)-(deriv_log_0_d0*(d_rKp1_dTemp_dt_GND)))+d_vtv_dTemp_dt_GND*((Kbci-Kbcx)-value_log_0))*Gci);
d_Iohm_dV_cx_ci = d_Vrci_dV_cx_ci*Gci;
Iohm = ((Vrci+(vtv*((Kbci-Kbcx)-value_log_0)))*Gci);
}
{
double value_sqrt_0 = sqrt(((Vrci*Vrci)+0.01));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_derf_dV_bi_cx = (Ivo*d_Iohm_dV_bi_cx/(Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0))));
d_derf_dV_bi_ei = (Ivo*d_Iohm_dV_bi_ei/(Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0))));
d_derf_dV_bi_ci = (Ivo*d_Iohm_dV_bi_ci/(Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0))));
d_derf_dV_bx_bp = (Ivo*d_Iohm_dV_bx_bp/(Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0))));
d_derf_dV_si_bp = (Ivo*d_Iohm_dV_si_bp/(Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0))));
d_derf_dV_bx_ei = (Ivo*d_Iohm_dV_bx_ei/(Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0))));
d_derf_dV_cx_ci = (((Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0)))*Ivo*d_Iohm_dV_cx_ci-(Ivo*Iohm)*Gci*((0.5*Ivo)*(model_.Ihrcf))*(deriv_sqrt_0_d0*((Vrci*d_Vrci_dV_cx_ci+d_Vrci_dV_cx_ci*Vrci))))/(Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0)))/(Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0))));
d_derf_dTemp_dt_GND = (((Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0)))*(Ivo*d_Iohm_dTemp_dt_GND+d_Ivo_dTemp_dt_GND*Iohm)-(Ivo*Iohm)*(Gci*0.5*d_Ivo_dTemp_dt_GND*(model_.Ihrcf)*value_sqrt_0+d_Gci_dTemp_dt_GND*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0))))/(Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0)))/(Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0))));
derf = ((Ivo*Iohm)/(Gci*(1.0+(((0.5*Ivo)*(model_.Ihrcf))*value_sqrt_0))));
}
{
double value_sqrt_0 = sqrt((1+(derf*derf)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_Irci_dV_bi_cx = ((value_sqrt_0*d_Iohm_dV_bi_cx-Iohm*(deriv_sqrt_0_d0*((derf*d_derf_dV_bi_cx+d_derf_dV_bi_cx*derf))))/value_sqrt_0/value_sqrt_0);
d_Irci_dV_bi_ei = ((value_sqrt_0*d_Iohm_dV_bi_ei-Iohm*(deriv_sqrt_0_d0*((derf*d_derf_dV_bi_ei+d_derf_dV_bi_ei*derf))))/value_sqrt_0/value_sqrt_0);
d_Irci_dV_bi_ci = ((value_sqrt_0*d_Iohm_dV_bi_ci-Iohm*(deriv_sqrt_0_d0*((derf*d_derf_dV_bi_ci+d_derf_dV_bi_ci*derf))))/value_sqrt_0/value_sqrt_0);
d_Irci_dV_bx_bp = ((value_sqrt_0*d_Iohm_dV_bx_bp-Iohm*(deriv_sqrt_0_d0*((derf*d_derf_dV_bx_bp+d_derf_dV_bx_bp*derf))))/value_sqrt_0/value_sqrt_0);
d_Irci_dV_si_bp = ((value_sqrt_0*d_Iohm_dV_si_bp-Iohm*(deriv_sqrt_0_d0*((derf*d_derf_dV_si_bp+d_derf_dV_si_bp*derf))))/value_sqrt_0/value_sqrt_0);
d_Irci_dV_bx_ei = ((value_sqrt_0*d_Iohm_dV_bx_ei-Iohm*(deriv_sqrt_0_d0*((derf*d_derf_dV_bx_ei+d_derf_dV_bx_ei*derf))))/value_sqrt_0/value_sqrt_0);
d_Irci_dTemp_dt_GND = ((value_sqrt_0*d_Iohm_dTemp_dt_GND-Iohm*(deriv_sqrt_0_d0*((derf*d_derf_dTemp_dt_GND+d_derf_dTemp_dt_GND*derf))))/value_sqrt_0/value_sqrt_0);
d_Irci_dV_cx_ci = ((value_sqrt_0*d_Iohm_dV_cx_ci-Iohm*(deriv_sqrt_0_d0*((derf*d_derf_dV_cx_ci+d_derf_dV_cx_ci*derf))))/value_sqrt_0/value_sqrt_0);
Irci = (Iohm/value_sqrt_0);
}

d_Irbx_dTemp_dt_GND = Vrbx*d_Gbx_dTemp_dt_GND;
d_Irbx_dV_b_bx = d_Vrbx_dV_b_bx*Gbx;
Irbx = (Vrbx*Gbx);

d_Irbi_dV_bi_ci = Vrbi*d_qb_dV_bi_ci*Gbi;
d_Irbi_dTemp_dt_GND = ((Vrbi*qb)*d_Gbi_dTemp_dt_GND+Vrbi*d_qb_dTemp_dt_GND*Gbi);
d_Irbi_dV_bi_ei = Vrbi*d_qb_dV_bi_ei*Gbi;
d_Irbi_dV_bx_bi = d_Vrbi_dV_bx_bi*qb*Gbi;
Irbi = ((Vrbi*qb)*Gbi);

d_Ire_dTemp_dt_GND = Vre*d_Ge_dTemp_dt_GND;
d_Ire_dV_e_ei = d_Vre_dV_e_ei*Ge;
Ire = (Vre*Ge);

d_Irbp_dV_bi_ci = Vrbp*d_qbp_dV_bi_ci*Gbp;
d_Irbp_dTemp_dt_GND = ((Vrbp*qbp)*d_Gbp_dTemp_dt_GND+Vrbp*d_qbp_dTemp_dt_GND*Gbp);
d_Irbp_dV_bi_ei = Vrbp*d_qbp_dV_bi_ei*Gbp;
d_Irbp_dV_bx_bp = Vrbp*d_qbp_dV_bx_bp*Gbp;
d_Irbp_dV_bp_cx = d_Vrbp_dV_bp_cx*qbp*Gbp;
Irbp = ((Vrbp*qbp)*Gbp);

d_Irs_dTemp_dt_GND = Vrs*d_Gs_dTemp_dt_GND;
d_Irs_dV_s_si = d_Vrs_dV_s_si*Gs;
Irs = (Vrs*Gs);
if (((model_.avc1)>0.0))
{
//Begin block igcBlock
{
//Block-local variables for block igcBlock
double vminm=0.0;
     double d_vminm_dTemp_dt_GND=0.0;
double vl=0.0;
     double d_vl_dTemp_dt_GND=0.0;
     double d_vl_dV_bi_ci=0.0;
double mac1=0.0;
     double d_mac1_dTemp_dt_GND=0.0;
     double d_mac1_dV_bi_ci=0.0;
double expi=0.0;
     double d_expi_dTemp_dt_GND=0.0;
     double d_expi_dV_bi_ci=0.0;
double expl=0.0;
//End of Block-local variables
{
double value_pow_0 = pow((0.02*(avc2_t+1.0)),(1.0/(1.01-(model_.mc))));
double  deriv_pow_0_d0 = (((0.02*(avc2_t+1.0)) == 0.0)?0.0:(value_pow_0*(1.0/(1.01-(model_.mc)))/(0.02*(avc2_t+1.0))));

d_vminm_dTemp_dt_GND = (deriv_pow_0_d0*(0.02*d_avc2_t_dTemp_dt_GND));
vminm = value_pow_0;
}
{
double value_sqrt_0 = sqrt(((((pc_t-Vbci)-vminm)*((pc_t-Vbci)-vminm))+0.01));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_vl_dV_bi_ci = 0.5*((deriv_sqrt_0_d0*((((pc_t-Vbci)-vminm)*(-d_Vbci_dV_bi_ci)+(-d_Vbci_dV_bi_ci)*((pc_t-Vbci)-vminm))))+(-d_Vbci_dV_bi_ci));
d_vl_dTemp_dt_GND = (0.5*((deriv_sqrt_0_d0*((((pc_t-Vbci)-vminm)*(d_pc_t_dTemp_dt_GND-d_vminm_dTemp_dt_GND)+(d_pc_t_dTemp_dt_GND-d_vminm_dTemp_dt_GND)*((pc_t-Vbci)-vminm))))+(d_pc_t_dTemp_dt_GND-d_vminm_dTemp_dt_GND))+d_vminm_dTemp_dt_GND);
vl = ((0.5*(value_sqrt_0+((pc_t-Vbci)-vminm)))+vminm);
}
{
double value_pow_0 = pow(vl,((model_.mc)-1.0));
double  deriv_pow_0_d0 = ((vl == 0.0)?0.0:(value_pow_0*((model_.mc)-1.0)/vl));

d_mac1_dV_bi_ci = (-avc2_t)*(deriv_pow_0_d0*(d_vl_dV_bi_ci));
d_mac1_dTemp_dt_GND = ((-avc2_t)*(deriv_pow_0_d0*(d_vl_dTemp_dt_GND))+(-d_avc2_t_dTemp_dt_GND)*value_pow_0);
mac1 = ((-avc2_t)*value_pow_0);
}
if ((mac1<(model_.VmaxExp)))
{
{
double value_exp_0 = exp(mac1);
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_ci = (deriv_exp_0_d0*(d_mac1_dV_bi_ci));
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(d_mac1_dTemp_dt_GND));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((model_.VmaxExp));
expl = value_exp_0;
}

d_expi_dV_bi_ci = expl*d_mac1_dV_bi_ci;
d_expi_dTemp_dt_GND = expl*d_mac1_dTemp_dt_GND;
expi = (expl*(1.0+(mac1-(model_.VmaxExp))));
}

d_avalf_dV_bx_cx =  0.0;
d_avalf_dV_bi_ci = (((model_.avc1)*vl)*d_expi_dV_bi_ci+(model_.avc1)*d_vl_dV_bi_ci*expi);
d_avalf_dTemp_dt_GND = (((model_.avc1)*vl)*d_expi_dTemp_dt_GND+(model_.avc1)*d_vl_dTemp_dt_GND*expi);
avalf = (((model_.avc1)*vl)*expi);
}
// End block igcBlock

d_Igc_dV_bx_bp = (-d_Ibcj_dV_bx_bp)*avalf;
d_Igc_dV_si_bp = (-d_Ibcj_dV_si_bp)*avalf;
d_Igc_dV_bx_ei = (-d_Ibcj_dV_bx_ei)*avalf;
d_Igc_dV_bi_ei = ((-d_Itzr_dV_bi_ei)-d_Ibcj_dV_bi_ei)*avalf;
d_Igc_dV_bi_ci = (((Itxf-Itzr)-Ibcj)*d_avalf_dV_bi_ci+((-d_Itzr_dV_bi_ci)-d_Ibcj_dV_bi_ci)*avalf);
d_Igc_dTemp_dt_GND = (((Itxf-Itzr)-Ibcj)*d_avalf_dTemp_dt_GND+((-d_Itzr_dTemp_dt_GND)-d_Ibcj_dTemp_dt_GND)*avalf);
d_Igc_dV_xf2_GND = d_Itxf_dV_xf2_GND*avalf;
Igc = (((Itxf-Itzr)-Ibcj)*avalf);
}
else
{

d_Igc_dV_xf2_GND = d_Igc_dTemp_dt_GND = d_Igc_dV_bi_ci = d_Igc_dV_bi_ei = d_Igc_dV_bx_ei = d_Igc_dV_si_bp = d_Igc_dV_bx_bp =  0.0;
Igc = 0.0;
}
if (((model_.avcx1)>0.0))
{
//Begin block igcxBlock
{
//Block-local variables for block igcxBlock
double vminm=0.0;
     double d_vminm_dTemp_dt_GND=0.0;
double vl=0.0;
     double d_vl_dV_bx_cx=0.0;
     double d_vl_dTemp_dt_GND=0.0;
double mac1=0.0;
     double d_mac1_dTemp_dt_GND=0.0;
     double d_mac1_dV_bx_cx=0.0;
double expi=0.0;
     double d_expi_dTemp_dt_GND=0.0;
     double d_expi_dV_bx_cx=0.0;
double expl=0.0;
//End of Block-local variables
{
double value_pow_0 = pow((0.02*(avcx2_t+1.0)),(1.0/(1.01-(model_.mcx))));
double  deriv_pow_0_d0 = (((0.02*(avcx2_t+1.0)) == 0.0)?0.0:(value_pow_0*(1.0/(1.01-(model_.mcx)))/(0.02*(avcx2_t+1.0))));

d_vminm_dTemp_dt_GND = (deriv_pow_0_d0*(0.02*d_avcx2_t_dTemp_dt_GND));
vminm = value_pow_0;
}
{
double value_sqrt_0 = sqrt(((((-Vbxcx)-vminm)*((-Vbxcx)-vminm))+0.01));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_vl_dTemp_dt_GND = (0.5*((deriv_sqrt_0_d0*((((-Vbxcx)-vminm)*(-d_vminm_dTemp_dt_GND)+(-d_vminm_dTemp_dt_GND)*((-Vbxcx)-vminm))))+(-d_vminm_dTemp_dt_GND))+d_vminm_dTemp_dt_GND);
d_vl_dV_bx_cx = 0.5*((deriv_sqrt_0_d0*((((-Vbxcx)-vminm)*(-d_Vbxcx_dV_bx_cx)+(-d_Vbxcx_dV_bx_cx)*((-Vbxcx)-vminm))))+(-d_Vbxcx_dV_bx_cx));
vl = ((0.5*(value_sqrt_0+((-Vbxcx)-vminm)))+vminm);
}
{
double value_pow_0 = pow(vl,((model_.mcx)-1.0));
double  deriv_pow_0_d0 = ((vl == 0.0)?0.0:(value_pow_0*((model_.mcx)-1.0)/vl));

d_mac1_dV_bx_cx = (-avcx2_t)*(deriv_pow_0_d0*(d_vl_dV_bx_cx));
d_mac1_dTemp_dt_GND = ((-avcx2_t)*(deriv_pow_0_d0*(d_vl_dTemp_dt_GND))+(-d_avcx2_t_dTemp_dt_GND)*value_pow_0);
mac1 = ((-avcx2_t)*value_pow_0);
}
if ((mac1<(model_.VmaxExp)))
{
{
double value_exp_0 = exp(mac1);
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bx_cx = (deriv_exp_0_d0*(d_mac1_dV_bx_cx));
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(d_mac1_dTemp_dt_GND));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((model_.VmaxExp));
expl = value_exp_0;
}

d_expi_dV_bx_cx = expl*d_mac1_dV_bx_cx;
d_expi_dTemp_dt_GND = expl*d_mac1_dTemp_dt_GND;
expi = (expl*(1.0+(mac1-(model_.VmaxExp))));
}

d_avalf_dV_bi_ci =  0.0;
d_avalf_dTemp_dt_GND = (((model_.avcx1)*vl)*d_expi_dTemp_dt_GND+(model_.avcx1)*d_vl_dTemp_dt_GND*expi);
d_avalf_dV_bx_cx = (((model_.avcx1)*vl)*d_expi_dV_bx_cx+(model_.avcx1)*d_vl_dV_bx_cx*expi);
avalf = (((model_.avcx1)*vl)*expi);
}
// End block igcxBlock

d_Igcx_dV_bi_ci = (-Ircx)*d_avalf_dV_bi_ci;
d_Igcx_dV_bx_cx = (-Ircx)*d_avalf_dV_bx_cx;
d_Igcx_dTemp_dt_GND = ((-Ircx)*d_avalf_dTemp_dt_GND+(-d_Ircx_dTemp_dt_GND)*avalf);
d_Igcx_dV_c_cx = (-d_Ircx_dV_c_cx)*avalf;
Igcx = ((-Ircx)*avalf);
}
else
{

d_Igcx_dV_c_cx = d_Igcx_dTemp_dt_GND = d_Igcx_dV_bx_cx = d_Igcx_dV_bi_ci =  0.0;
Igcx = 0.0;
}
if ((((model_.bbk)>0.0)&&((model_.ibk0)>0.0)))
{
if (((model_.vpte)>0.0))
{

d_VcbFac_dV_bi_ci = (-(d_Vbci_dV_bi_ci/(model_.vpte)));
VcbFac = ((1.0-(Vbci/(model_.vpte)))-0.1);
{
double value_sqrt_0 = sqrt(((VcbFac*VcbFac)+1.0e-4));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_VcbFac_dV_bi_ci = 0.5*(d_VcbFac_dV_bi_ci+(deriv_sqrt_0_d0*((VcbFac*d_VcbFac_dV_bi_ci+d_VcbFac_dV_bi_ci*VcbFac))));
VcbFac = (0.1+(0.5*(VcbFac+value_sqrt_0)));
}

d_Iibk_dV_bi_ci = (model_.ibk0)*d_VcbFac_dV_bi_ci;
Iibk = ((model_.ibk0)*VcbFac);
}
else
{

d_Iibk_dV_bi_ci =  0.0;
Iibk = (model_.ibk0);
}
{
double value_pow_0 = pow(((Itzf/Iibk)-1.0),(model_.abk));
double  deriv_pow_0_d0 = ((((Itzf/Iibk)-1.0) == 0.0)?0.0:(value_pow_0*(model_.abk)/((Itzf/Iibk)-1.0)));

d_Ibk_dV_bi_ci = (model_.bbk)*(deriv_pow_0_d0*(((Iibk*d_Itzf_dV_bi_ci-Itzf*d_Iibk_dV_bi_ci)/Iibk/Iibk)));
d_Ibk_dV_bi_ei = (model_.bbk)*(deriv_pow_0_d0*((d_Itzf_dV_bi_ei/Iibk)));
d_Ibk_dTemp_dt_GND = (model_.bbk)*(deriv_pow_0_d0*((d_Itzf_dTemp_dt_GND/Iibk)));
Ibk = ((model_.bbk)*value_pow_0);
}
}
else
{

d_Ibk_dTemp_dt_GND = d_Ibk_dV_bi_ei = d_Ibk_dV_bi_ci =  0.0;
Ibk = 0.0;
}

d_Ibc_dV_xf2_GND = (-d_Igc_dV_xf2_GND);
d_Ibc_dV_bi_ei = ((d_Ibcj_dV_bi_ei-d_Igc_dV_bi_ei)-d_Ibk_dV_bi_ei);
d_Ibc_dV_bi_ci = ((d_Ibcj_dV_bi_ci-d_Igc_dV_bi_ci)-d_Ibk_dV_bi_ci);
d_Ibc_dV_bx_bp = (d_Ibcj_dV_bx_bp-d_Igc_dV_bx_bp);
d_Ibc_dV_si_bp = (d_Ibcj_dV_si_bp-d_Igc_dV_si_bp);
d_Ibc_dV_bx_ei = (d_Ibcj_dV_bx_ei-d_Igc_dV_bx_ei);
d_Ibc_dTemp_dt_GND = ((d_Ibcj_dTemp_dt_GND-d_Igc_dTemp_dt_GND)-d_Ibk_dTemp_dt_GND);
Ibc = ((Ibcj-Igc)-Ibk);
if ((((model_.ibcip)>0.0)||((model_.ibcnp)>0.0)))
{

d_afac_dTemp_dt_GND = (-(model_.ncip)*d_vtv_dTemp_dt_GND/((model_.ncip)*vtv)/((model_.ncip)*vtv));
afac = (1.0/((model_.ncip)*vtv));
if ((Vbcp<maxvIbcip))
{
{
double value_exp_0 = exp((Vbcp*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_bx_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(Vbcp*d_afac_dTemp_dt_GND));
d_expi_dV_si_bp = (deriv_exp_0_d0*(d_Vbcp_dV_si_bp*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbcip*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bi_cx = d_expi_dV_bx_ei = d_expi_dV_bx_bp = d_expi_dV_bi_ci = d_expi_dV_bi_ei =  0.0;
d_expi_dV_si_bp = value_exp_0*d_Vbcp_dV_si_bp*afac;
d_expi_dTemp_dt_GND = (value_exp_0*(Vbcp-maxvIbcip)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIbcip*d_afac_dTemp_dt_GND))*(1.0+((Vbcp-maxvIbcip)*afac)));
expi = (value_exp_0*(1.0+((Vbcp-maxvIbcip)*afac)));
}
}

d_afac_dTemp_dt_GND = (-(model_.ncnp)*d_vtv_dTemp_dt_GND/((model_.ncnp)*vtv)/((model_.ncnp)*vtv));
afac = (1.0/((model_.ncnp)*vtv));
if ((Vbcp<maxvIbcnp))
{
{
double value_exp_0 = exp((Vbcp*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_bx_bp = d_expn_dV_bi_ci = d_expn_dV_bx_ei = d_expn_dV_bi_ei =  0.0;
d_expn_dTemp_dt_GND = (deriv_exp_0_d0*(Vbcp*d_afac_dTemp_dt_GND));
d_expn_dV_si_bp = (deriv_exp_0_d0*(d_Vbcp_dV_si_bp*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((maxvIbcnp*afac));
double  deriv_exp_0_d0 = value_exp_0;

d_expn_dV_bx_bp = d_expn_dV_bi_ci = d_expn_dV_bx_ei = d_expn_dV_bi_ei =  0.0;
d_expn_dV_si_bp = value_exp_0*d_Vbcp_dV_si_bp*afac;
d_expn_dTemp_dt_GND = (value_exp_0*(Vbcp-maxvIbcnp)*d_afac_dTemp_dt_GND+(deriv_exp_0_d0*(maxvIbcnp*d_afac_dTemp_dt_GND))*(1.0+((Vbcp-maxvIbcnp)*afac)));
expn = (value_exp_0*(1.0+((Vbcp-maxvIbcnp)*afac)));
}
}

d_Ibcp_dV_bi_ei = (ibcip_t*d_expi_dV_bi_ei+ibcnp_t*d_expn_dV_bi_ei);
d_Ibcp_dV_bi_ci = (ibcip_t*d_expi_dV_bi_ci+ibcnp_t*d_expn_dV_bi_ci);
d_Ibcp_dV_bx_bp = (ibcip_t*d_expi_dV_bx_bp+ibcnp_t*d_expn_dV_bx_bp);
d_Ibcp_dV_si_bp = (ibcip_t*d_expi_dV_si_bp+ibcnp_t*d_expn_dV_si_bp);
d_Ibcp_dV_bx_ei = (ibcip_t*d_expi_dV_bx_ei+ibcnp_t*d_expn_dV_bx_ei);
d_Ibcp_dTemp_dt_GND = ((ibcip_t*d_expi_dTemp_dt_GND+d_ibcip_t_dTemp_dt_GND*(expi-1.0))+(ibcnp_t*d_expn_dTemp_dt_GND+d_ibcnp_t_dTemp_dt_GND*(expn-1.0)));
Ibcp = ((ibcip_t*(expi-1.0))+(ibcnp_t*(expn-1.0)));
}
else
{

d_Ibcp_dTemp_dt_GND = d_Ibcp_dV_bx_ei = d_Ibcp_dV_si_bp = d_Ibcp_dV_bx_bp = d_Ibcp_dV_bi_ci = d_Ibcp_dV_bi_ei =  0.0;
Ibcp = 0.0;
}

d_power_dV_bp_cx = (Irbp*d_Vrbp_dV_bp_cx+d_Irbp_dV_bp_cx*Vrbp);
d_power_dV_e_ei = (Ire*d_Vre_dV_e_ei+d_Ire_dV_e_ei*Vre);
d_power_dV_bx_bi = (Irbi*d_Vrbi_dV_bx_bi+d_Irbi_dV_bx_bi*Vrbi);
d_power_dV_b_bx = (Irbx*d_Vrbx_dV_b_bx+d_Irbx_dV_b_bx*Vrbx);
d_power_dV_bi_cx = d_Irci_dV_bi_cx*Vrci;
d_power_dV_cx_ci = (Irci*d_Vrci_dV_cx_ci+d_Irci_dV_cx_ci*Vrci);
d_power_dV_c_cx = (Ircx*d_Vrcx_dV_c_cx+d_Ircx_dV_c_cx*Vrcx);
d_power_dV_bx_si = Iccp*d_Vcep_dV_bx_si;
d_power_dV_s_si = (Irs*d_Vrs_dV_s_si+d_Irs_dV_s_si*Vrs);
d_power_dV_ci_ei = (Itxf-Itzr)*d_Vcei_dV_ci_ei;
d_power_dV_xf2_GND = (d_Ibc_dV_xf2_GND*Vbci+d_Itxf_dV_xf2_GND*Vcei);
d_power_dV_bx_bp = (((((((d_Ibe_dV_bx_bp*Vbei+d_Ibc_dV_bx_bp*Vbci)+d_Ibex_dV_bx_bp*Vbex)+(Ibep*d_Vbep_dV_bx_bp+d_Ibep_dV_bx_bp*Vbep))+d_Ibcp_dV_bx_bp*Vbcp)+d_Iccp_dV_bx_bp*Vcep)+d_Irci_dV_bx_bp*Vrci)+d_Irbp_dV_bx_bp*Vrbp);
d_power_dV_si_bp = ((((((d_Ibe_dV_si_bp*Vbei+d_Ibc_dV_si_bp*Vbci)+d_Ibex_dV_si_bp*Vbex)+d_Ibep_dV_si_bp*Vbep)+(Ibcp*d_Vbcp_dV_si_bp+d_Ibcp_dV_si_bp*Vbcp))+d_Iccp_dV_si_bp*Vcep)+d_Irci_dV_si_bp*Vrci);
d_power_dV_bi_ci = (((((((((d_Ibe_dV_bi_ci*Vbei+(Ibc*d_Vbci_dV_bi_ci+d_Ibc_dV_bi_ci*Vbci))+(-d_Itzr_dV_bi_ci)*Vcei)+d_Ibex_dV_bi_ci*Vbex)+d_Ibep_dV_bi_ci*Vbep)+d_Ibcp_dV_bi_ci*Vbcp)+d_Iccp_dV_bi_ci*Vcep)+d_Irci_dV_bi_ci*Vrci)+d_Irbi_dV_bi_ci*Vrbi)+d_Irbp_dV_bi_ci*Vrbp);
d_power_dV_bi_ei = ((((((((((Ibe*d_Vbei_dV_bi_ei+d_Ibe_dV_bi_ei*Vbei)+d_Ibc_dV_bi_ei*Vbci)+(-d_Itzr_dV_bi_ei)*Vcei)+d_Ibex_dV_bi_ei*Vbex)+d_Ibep_dV_bi_ei*Vbep)+d_Ibcp_dV_bi_ei*Vbcp)+d_Iccp_dV_bi_ei*Vcep)+d_Irci_dV_bi_ei*Vrci)+d_Irbi_dV_bi_ei*Vrbi)+d_Irbp_dV_bi_ei*Vrbp);
d_power_dTemp_dt_GND = (((((((((((((d_Ibe_dTemp_dt_GND*Vbei+d_Ibc_dTemp_dt_GND*Vbci)+(-d_Itzr_dTemp_dt_GND)*Vcei)+d_Ibex_dTemp_dt_GND*Vbex)+d_Ibep_dTemp_dt_GND*Vbep)+d_Irs_dTemp_dt_GND*Vrs)+d_Ibcp_dTemp_dt_GND*Vbcp)+d_Iccp_dTemp_dt_GND*Vcep)+d_Ircx_dTemp_dt_GND*Vrcx)+d_Irci_dTemp_dt_GND*Vrci)+d_Irbx_dTemp_dt_GND*Vrbx)+d_Irbi_dTemp_dt_GND*Vrbi)+d_Ire_dTemp_dt_GND*Vre)+d_Irbp_dTemp_dt_GND*Vrbp);
d_power_dV_bx_ei = (((((d_Ibe_dV_bx_ei*Vbei+d_Ibc_dV_bx_ei*Vbci)+(Ibex*d_Vbex_dV_bx_ei+d_Ibex_dV_bx_ei*Vbex))+d_Ibep_dV_bx_ei*Vbep)+d_Ibcp_dV_bx_ei*Vbcp)+d_Irci_dV_bx_ei*Vrci);
power = ((((((((((((((Ibe*Vbei)+(Ibc*Vbci))+((Itxf-Itzr)*Vcei))+(Ibex*Vbex))+(Ibep*Vbep))+(Irs*Vrs))+(Ibcp*Vbcp))+(Iccp*Vcep))+(Ircx*Vrcx))+(Irci*Vrci))+(Irbx*Vrbx))+(Irbi*Vrbi))+(Ire*Vre))+(Irbp*Vrbp));

d_Ith_dV_bp_cx = (-sw_et)*d_power_dV_bp_cx;
d_Ith_dV_e_ei = (-sw_et)*d_power_dV_e_ei;
d_Ith_dV_bx_bi = (-sw_et)*d_power_dV_bx_bi;
d_Ith_dV_b_bx = (-sw_et)*d_power_dV_b_bx;
d_Ith_dV_bi_cx = (-sw_et)*d_power_dV_bi_cx;
d_Ith_dV_cx_ci = (-sw_et)*d_power_dV_cx_ci;
d_Ith_dV_c_cx = (-sw_et)*d_power_dV_c_cx;
d_Ith_dV_bx_si = (-sw_et)*d_power_dV_bx_si;
d_Ith_dV_s_si = (-sw_et)*d_power_dV_s_si;
d_Ith_dV_ci_ei = (-sw_et)*d_power_dV_ci_ei;
d_Ith_dV_xf2_GND = (-sw_et)*d_power_dV_xf2_GND;
d_Ith_dV_bx_bp = (-sw_et)*d_power_dV_bx_bp;
d_Ith_dV_si_bp = (-sw_et)*d_power_dV_si_bp;
d_Ith_dV_bi_ci = (-sw_et)*d_power_dV_bi_ci;
d_Ith_dV_bi_ei = (-sw_et)*d_power_dV_bi_ei;
d_Ith_dTemp_dt_GND = (-sw_et)*d_power_dTemp_dt_GND;
d_Ith_dV_bx_ei = (-sw_et)*d_power_dV_bx_ei;
Ith = ((-sw_et)*power);

d_Irth_dTemp_dt_GND = (dt_et*d_Gth_dTemp_dt_GND+d_dt_et_dTemp_dt_GND*Gth);
Irth = (dt_et*Gth);

d_Ixf1_dV_bi_ci = (-d_Itzf_dV_bi_ci);
d_Ixf1_dV_bi_ei = (-d_Itzf_dV_bi_ei);
d_Ixf1_dTemp_dt_GND = (-d_Itzf_dTemp_dt_GND);
d_Ixf1_dV_xf2_GND = d_Vxf2_dV_xf2_GND;
Ixf1 = (Vxf2-Itzf);

d_Ixf2_dV_xf1_GND = (-d_Vxf1_dV_xf1_GND);
d_Ixf2_dV_xf2_GND = d_Vxf2_dV_xf2_GND;
Ixf2 = (Vxf2-Vxf1);

d_Ibe_dV_bi_ei = (d_Ibe_dV_bi_ei+(model_.gminMod)*d_Vbei_dV_bi_ei);
Ibe = (Ibe+((model_.gminMod)*Vbei));

d_Ibex_dV_bx_ei = (d_Ibex_dV_bx_ei+(model_.gminMod)*d_Vbex_dV_bx_ei);
Ibex = (Ibex+((model_.gminMod)*Vbex));

d_Ibep_dV_bx_bp = (d_Ibep_dV_bx_bp+(model_.gminMod)*d_Vbep_dV_bx_bp);
Ibep = (Ibep+((model_.gminMod)*Vbep));

d_Ibc_dV_bi_ci = (d_Ibc_dV_bi_ci+(model_.gminMod)*d_Vbci_dV_bi_ci);
Ibc = (Ibc+((model_.gminMod)*Vbci));

d_Igcx_dV_bx_cx = (d_Igcx_dV_bx_cx+(model_.gminMod)*d_Vbxcx_dV_bx_cx);
Igcx = (Igcx+((model_.gminMod)*Vbxcx));

d_Ibcp_dV_si_bp = (d_Ibcp_dV_si_bp+(model_.gminMod)*d_Vbcp_dV_si_bp);
Ibcp = (Ibcp+((model_.gminMod)*Vbcp));

d_Ibe_dV_bx_bp = ((model_.VBICtype)*mMod)*d_Ibe_dV_bx_bp;
d_Ibe_dV_si_bp = ((model_.VBICtype)*mMod)*d_Ibe_dV_si_bp;
d_Ibe_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Ibe_dV_bi_ci;
d_Ibe_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Ibe_dV_bi_ei;
d_Ibe_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Ibe_dTemp_dt_GND;
d_Ibe_dV_bx_ei = ((model_.VBICtype)*mMod)*d_Ibe_dV_bx_ei;
Ibe = (((model_.VBICtype)*mMod)*Ibe);

d_Ibex_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Ibex_dV_bi_ei;
d_Ibex_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Ibex_dV_bi_ci;
d_Ibex_dV_bx_bp = ((model_.VBICtype)*mMod)*d_Ibex_dV_bx_bp;
d_Ibex_dV_si_bp = ((model_.VBICtype)*mMod)*d_Ibex_dV_si_bp;
d_Ibex_dV_bx_ei = ((model_.VBICtype)*mMod)*d_Ibex_dV_bx_ei;
d_Ibex_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Ibex_dTemp_dt_GND;
Ibex = (((model_.VBICtype)*mMod)*Ibex);

d_Itzf_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Itzf_dV_bi_ci;
d_Itzf_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Itzf_dV_bi_ei;
d_Itzf_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Itzf_dTemp_dt_GND;
Itzf = (((model_.VBICtype)*mMod)*Itzf);

d_Itxf_dV_xf2_GND = ((model_.VBICtype)*mMod)*d_Itxf_dV_xf2_GND;
Itxf = (((model_.VBICtype)*mMod)*Itxf);

d_Itzr_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Itzr_dV_bi_ei;
d_Itzr_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Itzr_dV_bi_ci;
d_Itzr_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Itzr_dTemp_dt_GND;
Itzr = (((model_.VBICtype)*mMod)*Itzr);

d_Ibc_dV_xf2_GND = ((model_.VBICtype)*mMod)*d_Ibc_dV_xf2_GND;
d_Ibc_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Ibc_dV_bi_ei;
d_Ibc_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Ibc_dV_bi_ci;
d_Ibc_dV_bx_bp = ((model_.VBICtype)*mMod)*d_Ibc_dV_bx_bp;
d_Ibc_dV_si_bp = ((model_.VBICtype)*mMod)*d_Ibc_dV_si_bp;
d_Ibc_dV_bx_ei = ((model_.VBICtype)*mMod)*d_Ibc_dV_bx_ei;
d_Ibc_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Ibc_dTemp_dt_GND;
Ibc = (((model_.VBICtype)*mMod)*Ibc);

d_Igcx_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Igcx_dV_bi_ci;
d_Igcx_dV_bx_cx = ((model_.VBICtype)*mMod)*d_Igcx_dV_bx_cx;
d_Igcx_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Igcx_dTemp_dt_GND;
d_Igcx_dV_c_cx = ((model_.VBICtype)*mMod)*d_Igcx_dV_c_cx;
Igcx = (((model_.VBICtype)*mMod)*Igcx);

d_Ibep_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Ibep_dV_bi_ei;
d_Ibep_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Ibep_dV_bi_ci;
d_Ibep_dV_bx_bp = ((model_.VBICtype)*mMod)*d_Ibep_dV_bx_bp;
d_Ibep_dV_si_bp = ((model_.VBICtype)*mMod)*d_Ibep_dV_si_bp;
d_Ibep_dV_bx_ei = ((model_.VBICtype)*mMod)*d_Ibep_dV_bx_ei;
d_Ibep_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Ibep_dTemp_dt_GND;
Ibep = (((model_.VBICtype)*mMod)*Ibep);

d_Ircx_dTemp_dt_GND = mMod*d_Ircx_dTemp_dt_GND;
d_Ircx_dV_c_cx = mMod*d_Ircx_dV_c_cx;
Ircx = (mMod*Ircx);

d_Irci_dV_bi_cx = ((model_.VBICtype)*mMod)*d_Irci_dV_bi_cx;
d_Irci_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Irci_dV_bi_ei;
d_Irci_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Irci_dV_bi_ci;
d_Irci_dV_bx_bp = ((model_.VBICtype)*mMod)*d_Irci_dV_bx_bp;
d_Irci_dV_si_bp = ((model_.VBICtype)*mMod)*d_Irci_dV_si_bp;
d_Irci_dV_bx_ei = ((model_.VBICtype)*mMod)*d_Irci_dV_bx_ei;
d_Irci_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Irci_dTemp_dt_GND;
d_Irci_dV_cx_ci = ((model_.VBICtype)*mMod)*d_Irci_dV_cx_ci;
Irci = (((model_.VBICtype)*mMod)*Irci);

d_Irbx_dTemp_dt_GND = mMod*d_Irbx_dTemp_dt_GND;
d_Irbx_dV_b_bx = mMod*d_Irbx_dV_b_bx;
Irbx = (mMod*Irbx);

d_Irbi_dV_bi_ci = mMod*d_Irbi_dV_bi_ci;
d_Irbi_dTemp_dt_GND = mMod*d_Irbi_dTemp_dt_GND;
d_Irbi_dV_bi_ei = mMod*d_Irbi_dV_bi_ei;
d_Irbi_dV_bx_bi = mMod*d_Irbi_dV_bx_bi;
Irbi = (mMod*Irbi);

d_Ire_dTemp_dt_GND = mMod*d_Ire_dTemp_dt_GND;
d_Ire_dV_e_ei = mMod*d_Ire_dV_e_ei;
Ire = (mMod*Ire);

d_Irbp_dV_bi_ci = mMod*d_Irbp_dV_bi_ci;
d_Irbp_dTemp_dt_GND = mMod*d_Irbp_dTemp_dt_GND;
d_Irbp_dV_bi_ei = mMod*d_Irbp_dV_bi_ei;
d_Irbp_dV_bx_bp = mMod*d_Irbp_dV_bx_bp;
d_Irbp_dV_bp_cx = mMod*d_Irbp_dV_bp_cx;
Irbp = (mMod*Irbp);

d_Ibcp_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Ibcp_dV_bi_ei;
d_Ibcp_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Ibcp_dV_bi_ci;
d_Ibcp_dV_bx_bp = ((model_.VBICtype)*mMod)*d_Ibcp_dV_bx_bp;
d_Ibcp_dV_si_bp = ((model_.VBICtype)*mMod)*d_Ibcp_dV_si_bp;
d_Ibcp_dV_bx_ei = ((model_.VBICtype)*mMod)*d_Ibcp_dV_bx_ei;
d_Ibcp_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Ibcp_dTemp_dt_GND;
Ibcp = (((model_.VBICtype)*mMod)*Ibcp);

d_Iccp_dV_si_bp = ((model_.VBICtype)*mMod)*d_Iccp_dV_si_bp;
d_Iccp_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Iccp_dV_bi_ei;
d_Iccp_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Iccp_dV_bi_ci;
d_Iccp_dV_bx_bp = ((model_.VBICtype)*mMod)*d_Iccp_dV_bx_bp;
d_Iccp_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Iccp_dTemp_dt_GND;
Iccp = (((model_.VBICtype)*mMod)*Iccp);

d_Irs_dTemp_dt_GND = mMod*d_Irs_dTemp_dt_GND;
d_Irs_dV_s_si = mMod*d_Irs_dV_s_si;
Irs = (mMod*Irs);

d_Ith_dV_bp_cx = mMod*d_Ith_dV_bp_cx;
d_Ith_dV_e_ei = mMod*d_Ith_dV_e_ei;
d_Ith_dV_bx_bi = mMod*d_Ith_dV_bx_bi;
d_Ith_dV_b_bx = mMod*d_Ith_dV_b_bx;
d_Ith_dV_bi_cx = mMod*d_Ith_dV_bi_cx;
d_Ith_dV_cx_ci = mMod*d_Ith_dV_cx_ci;
d_Ith_dV_c_cx = mMod*d_Ith_dV_c_cx;
d_Ith_dV_bx_si = mMod*d_Ith_dV_bx_si;
d_Ith_dV_s_si = mMod*d_Ith_dV_s_si;
d_Ith_dV_ci_ei = mMod*d_Ith_dV_ci_ei;
d_Ith_dV_xf2_GND = mMod*d_Ith_dV_xf2_GND;
d_Ith_dV_bx_bp = mMod*d_Ith_dV_bx_bp;
d_Ith_dV_si_bp = mMod*d_Ith_dV_si_bp;
d_Ith_dV_bi_ci = mMod*d_Ith_dV_bi_ci;
d_Ith_dV_bi_ei = mMod*d_Ith_dV_bi_ei;
d_Ith_dTemp_dt_GND = mMod*d_Ith_dTemp_dt_GND;
d_Ith_dV_bx_ei = mMod*d_Ith_dV_bx_ei;
Ith = (mMod*Ith);

d_Irth_dTemp_dt_GND = mMod*d_Irth_dTemp_dt_GND;
Irth = (mMod*Irth);
}
// End block evaluateStatic
//Begin block evaluateDynamic
{
if (((model_.cjcp)>0.0))
{
//Begin block qdbcpBlock
{
//Block-local variables for block qdbcpBlock
double dv0=0.0;
     double d_dv0_dTemp_dt_GND=0.0;
double dvh=0.0;
     double d_dvh_dV_si_bp=0.0;
     double d_dvh_dTemp_dt_GND=0.0;
double pwq=0.0;
double qlo=0.0;
     double d_qlo_dV_si_bp=0.0;
     double d_qlo_dTemp_dt_GND=0.0;
double qhi=0.0;
     double d_qhi_dV_si_bp=0.0;
     double d_qhi_dTemp_dt_GND=0.0;
double mv0=0.0;
     double d_mv0_dTemp_dt_GND=0.0;
double vl0=0.0;
     double d_vl0_dTemp_dt_GND=0.0;
double q0=0.0;
     double d_q0_dTemp_dt_GND=0.0;
double dv=0.0;
     double d_dv_dV_si_bp=0.0;
     double d_dv_dTemp_dt_GND=0.0;
double mv=0.0;
     double d_mv_dV_si_bp=0.0;
     double d_mv_dTemp_dt_GND=0.0;
double vl=0.0;
     double d_vl_dV_si_bp=0.0;
     double d_vl_dTemp_dt_GND=0.0;
//End of Block-local variables

d_dv0_dTemp_dt_GND = (-d_ps_t_dTemp_dt_GND)*(model_.fc);
dv0 = ((-ps_t)*(model_.fc));
if (((model_.ajs)<=0.0))
{

d_dvh_dTemp_dt_GND = d_dv0_dTemp_dt_GND;
d_dvh_dV_si_bp = d_Vbcp_dV_si_bp;
dvh = (Vbcp+dv0);
if ((dvh>0.0))
{
{
double value_pow_0 = pow((1.0-(model_.fc)),(-(model_.ms)));
pwq = value_pow_0;
}

d_qlo_dV_si_bp =  0.0;
d_qlo_dTemp_dt_GND = (d_ps_t_dTemp_dt_GND*(1.0-(pwq*(1.0-(model_.fc))))/(1.0-(model_.ms)));
qlo = ((ps_t*(1.0-(pwq*(1.0-(model_.fc)))))/(1.0-(model_.ms)));

d_qhi_dTemp_dt_GND = (dvh*(((ps_t*(1.0-(model_.fc)))*(0.5*(model_.ms))*d_dvh_dTemp_dt_GND-((0.5*(model_.ms))*dvh)*d_ps_t_dTemp_dt_GND*(1.0-(model_.fc)))/(ps_t*(1.0-(model_.fc)))/(ps_t*(1.0-(model_.fc))))+d_dvh_dTemp_dt_GND*(1.0+(((0.5*(model_.ms))*dvh)/(ps_t*(1.0-(model_.fc))))))*pwq;
d_qhi_dV_si_bp = (dvh*((0.5*(model_.ms))*d_dvh_dV_si_bp/(ps_t*(1.0-(model_.fc))))+d_dvh_dV_si_bp*(1.0+(((0.5*(model_.ms))*dvh)/(ps_t*(1.0-(model_.fc))))))*pwq;
qhi = ((dvh*(1.0+(((0.5*(model_.ms))*dvh)/(ps_t*(1.0-(model_.fc))))))*pwq);
}
else
{
{
double value_pow_0 = pow((1.0-(Vbcp/ps_t)),(1.0-(model_.ms)));
double  deriv_pow_0_d0 = (((1.0-(Vbcp/ps_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.ms))/(1.0-(Vbcp/ps_t))));

d_qlo_dV_si_bp = (ps_t*(-(deriv_pow_0_d0*((-(d_Vbcp_dV_si_bp/ps_t)))))/(1.0-(model_.ms)));
d_qlo_dTemp_dt_GND = ((ps_t*(-(deriv_pow_0_d0*((-(-Vbcp*d_ps_t_dTemp_dt_GND/ps_t/ps_t)))))+d_ps_t_dTemp_dt_GND*(1.0-value_pow_0))/(1.0-(model_.ms)));
qlo = ((ps_t*(1.0-value_pow_0))/(1.0-(model_.ms)));
}

d_qhi_dV_si_bp = d_qhi_dTemp_dt_GND =  0.0;
qhi = 0.0;
}

d_qdbcp_dTemp_dt_GND = (d_qlo_dTemp_dt_GND+d_qhi_dTemp_dt_GND);
d_qdbcp_dV_si_bp = (d_qlo_dV_si_bp+d_qhi_dV_si_bp);
qdbcp = (qlo+qhi);
}
else
{
{
double value_sqrt_0 = sqrt(((dv0*dv0)+((4.0*(model_.ajs))*(model_.ajs))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_mv0_dTemp_dt_GND = (deriv_sqrt_0_d0*((dv0*d_dv0_dTemp_dt_GND+d_dv0_dTemp_dt_GND*dv0)));
mv0 = value_sqrt_0;
}

d_vl0_dTemp_dt_GND = (-0.5)*(d_dv0_dTemp_dt_GND+d_mv0_dTemp_dt_GND);
vl0 = ((-0.5)*(dv0+mv0));
{
double value_pow_0 = pow((1.0-(vl0/ps_t)),(1.0-(model_.ms)));
double  deriv_pow_0_d0 = (((1.0-(vl0/ps_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.ms))/(1.0-(vl0/ps_t))));

d_q0_dTemp_dt_GND = (((-ps_t)*(deriv_pow_0_d0*((-((ps_t*d_vl0_dTemp_dt_GND-vl0*d_ps_t_dTemp_dt_GND)/ps_t/ps_t))))+(-d_ps_t_dTemp_dt_GND)*value_pow_0)/(1.0-(model_.ms)));
q0 = (((-ps_t)*value_pow_0)/(1.0-(model_.ms)));
}

d_dv_dTemp_dt_GND = d_dv0_dTemp_dt_GND;
d_dv_dV_si_bp = d_Vbcp_dV_si_bp;
dv = (Vbcp+dv0);
{
double value_sqrt_0 = sqrt(((dv*dv)+((4.0*(model_.ajs))*(model_.ajs))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_mv_dTemp_dt_GND = (deriv_sqrt_0_d0*((dv*d_dv_dTemp_dt_GND+d_dv_dTemp_dt_GND*dv)));
d_mv_dV_si_bp = (deriv_sqrt_0_d0*((dv*d_dv_dV_si_bp+d_dv_dV_si_bp*dv)));
mv = value_sqrt_0;
}

d_vl_dTemp_dt_GND = (0.5*(d_dv_dTemp_dt_GND-d_mv_dTemp_dt_GND)-d_dv0_dTemp_dt_GND);
d_vl_dV_si_bp = 0.5*(d_dv_dV_si_bp-d_mv_dV_si_bp);
vl = ((0.5*(dv-mv))-dv0);
{
double value_pow_0 = pow((1.0-(vl/ps_t)),(1.0-(model_.ms)));
double  deriv_pow_0_d0 = (((1.0-(vl/ps_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.ms))/(1.0-(vl/ps_t))));

d_qlo_dV_si_bp = ((-ps_t)*(deriv_pow_0_d0*((-(d_vl_dV_si_bp/ps_t))))/(1.0-(model_.ms)));
d_qlo_dTemp_dt_GND = (((-ps_t)*(deriv_pow_0_d0*((-((ps_t*d_vl_dTemp_dt_GND-vl*d_ps_t_dTemp_dt_GND)/ps_t/ps_t))))+(-d_ps_t_dTemp_dt_GND)*value_pow_0)/(1.0-(model_.ms)));
qlo = (((-ps_t)*value_pow_0)/(1.0-(model_.ms)));
}
{
double value_pow_0 = pow((1.0-(model_.fc)),(-(model_.ms)));

d_qdbcp_dTemp_dt_GND = ((d_qlo_dTemp_dt_GND+((value_pow_0*((Vbcp-vl)+vl0))*(((ps_t*(1.0-(model_.fc)))*(0.5*(model_.ms))*((-d_vl_dTemp_dt_GND)+d_vl0_dTemp_dt_GND)-((0.5*(model_.ms))*((Vbcp-vl)+vl0))*d_ps_t_dTemp_dt_GND*(1.0-(model_.fc)))/(ps_t*(1.0-(model_.fc)))/(ps_t*(1.0-(model_.fc))))+value_pow_0*((-d_vl_dTemp_dt_GND)+d_vl0_dTemp_dt_GND)*(1.0+(((0.5*(model_.ms))*((Vbcp-vl)+vl0))/(ps_t*(1.0-(model_.fc)))))))-d_q0_dTemp_dt_GND);
d_qdbcp_dV_si_bp = (d_qlo_dV_si_bp+((value_pow_0*((Vbcp-vl)+vl0))*((0.5*(model_.ms))*(d_Vbcp_dV_si_bp-d_vl_dV_si_bp)/(ps_t*(1.0-(model_.fc))))+value_pow_0*(d_Vbcp_dV_si_bp-d_vl_dV_si_bp)*(1.0+(((0.5*(model_.ms))*((Vbcp-vl)+vl0))/(ps_t*(1.0-(model_.fc)))))));
qdbcp = ((qlo+((value_pow_0*((Vbcp-vl)+vl0))*(1.0+(((0.5*(model_.ms))*((Vbcp-vl)+vl0))/(ps_t*(1.0-(model_.fc)))))))-q0);
}
}
}
// End block qdbcpBlock
}
else
{

d_qdbcp_dV_si_bp = d_qdbcp_dTemp_dt_GND =  0.0;
qdbcp = 0.0;
}
//Begin block qdbexBlock
{
//Block-local variables for block qdbexBlock
double dv0=0.0;
     double d_dv0_dTemp_dt_GND=0.0;
double dvh=0.0;
     double d_dvh_dV_bx_ei=0.0;
     double d_dvh_dTemp_dt_GND=0.0;
double pwq=0.0;
double qlo=0.0;
     double d_qlo_dV_bx_ei=0.0;
     double d_qlo_dTemp_dt_GND=0.0;
double qhi=0.0;
     double d_qhi_dV_bx_ei=0.0;
     double d_qhi_dTemp_dt_GND=0.0;
double mv0=0.0;
     double d_mv0_dTemp_dt_GND=0.0;
double vl0=0.0;
     double d_vl0_dTemp_dt_GND=0.0;
double q0=0.0;
     double d_q0_dTemp_dt_GND=0.0;
double dv=0.0;
     double d_dv_dV_bx_ei=0.0;
     double d_dv_dTemp_dt_GND=0.0;
double mv=0.0;
     double d_mv_dV_bx_ei=0.0;
     double d_mv_dTemp_dt_GND=0.0;
double vl=0.0;
     double d_vl_dV_bx_ei=0.0;
     double d_vl_dTemp_dt_GND=0.0;
//End of Block-local variables

d_dv0_dTemp_dt_GND = (-d_pe_t_dTemp_dt_GND)*(model_.fc);
dv0 = ((-pe_t)*(model_.fc));
if (((model_.aje)<=0.0))
{

d_dvh_dTemp_dt_GND = d_dv0_dTemp_dt_GND;
d_dvh_dV_bx_ei = d_Vbex_dV_bx_ei;
dvh = (Vbex+dv0);
if ((dvh>0.0))
{
{
double value_pow_0 = pow((1.0-(model_.fc)),(-(model_.me)));
pwq = value_pow_0;
}

d_qlo_dV_bx_ei =  0.0;
d_qlo_dTemp_dt_GND = (d_pe_t_dTemp_dt_GND*(1.0-(pwq*(1.0-(model_.fc))))/(1.0-(model_.me)));
qlo = ((pe_t*(1.0-(pwq*(1.0-(model_.fc)))))/(1.0-(model_.me)));

d_qhi_dTemp_dt_GND = (dvh*(((pe_t*(1.0-(model_.fc)))*(0.5*(model_.me))*d_dvh_dTemp_dt_GND-((0.5*(model_.me))*dvh)*d_pe_t_dTemp_dt_GND*(1.0-(model_.fc)))/(pe_t*(1.0-(model_.fc)))/(pe_t*(1.0-(model_.fc))))+d_dvh_dTemp_dt_GND*(1.0+(((0.5*(model_.me))*dvh)/(pe_t*(1.0-(model_.fc))))))*pwq;
d_qhi_dV_bx_ei = (dvh*((0.5*(model_.me))*d_dvh_dV_bx_ei/(pe_t*(1.0-(model_.fc))))+d_dvh_dV_bx_ei*(1.0+(((0.5*(model_.me))*dvh)/(pe_t*(1.0-(model_.fc))))))*pwq;
qhi = ((dvh*(1.0+(((0.5*(model_.me))*dvh)/(pe_t*(1.0-(model_.fc))))))*pwq);
}
else
{
{
double value_pow_0 = pow((1.0-(Vbex/pe_t)),(1.0-(model_.me)));
double  deriv_pow_0_d0 = (((1.0-(Vbex/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.me))/(1.0-(Vbex/pe_t))));

d_qlo_dV_bx_ei = (pe_t*(-(deriv_pow_0_d0*((-(d_Vbex_dV_bx_ei/pe_t)))))/(1.0-(model_.me)));
d_qlo_dTemp_dt_GND = ((pe_t*(-(deriv_pow_0_d0*((-(-Vbex*d_pe_t_dTemp_dt_GND/pe_t/pe_t)))))+d_pe_t_dTemp_dt_GND*(1.0-value_pow_0))/(1.0-(model_.me)));
qlo = ((pe_t*(1.0-value_pow_0))/(1.0-(model_.me)));
}

d_qhi_dV_bx_ei = d_qhi_dTemp_dt_GND =  0.0;
qhi = 0.0;
}

d_qdbex_dTemp_dt_GND = (d_qlo_dTemp_dt_GND+d_qhi_dTemp_dt_GND);
d_qdbex_dV_bx_ei = (d_qlo_dV_bx_ei+d_qhi_dV_bx_ei);
qdbex = (qlo+qhi);
}
else
{
{
double value_sqrt_0 = sqrt(((dv0*dv0)+((4.0*(model_.aje))*(model_.aje))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_mv0_dTemp_dt_GND = (deriv_sqrt_0_d0*((dv0*d_dv0_dTemp_dt_GND+d_dv0_dTemp_dt_GND*dv0)));
mv0 = value_sqrt_0;
}

d_vl0_dTemp_dt_GND = (-0.5)*(d_dv0_dTemp_dt_GND+d_mv0_dTemp_dt_GND);
vl0 = ((-0.5)*(dv0+mv0));
{
double value_pow_0 = pow((1.0-(vl0/pe_t)),(1.0-(model_.me)));
double  deriv_pow_0_d0 = (((1.0-(vl0/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.me))/(1.0-(vl0/pe_t))));

d_q0_dTemp_dt_GND = (((-pe_t)*(deriv_pow_0_d0*((-((pe_t*d_vl0_dTemp_dt_GND-vl0*d_pe_t_dTemp_dt_GND)/pe_t/pe_t))))+(-d_pe_t_dTemp_dt_GND)*value_pow_0)/(1.0-(model_.me)));
q0 = (((-pe_t)*value_pow_0)/(1.0-(model_.me)));
}

d_dv_dTemp_dt_GND = d_dv0_dTemp_dt_GND;
d_dv_dV_bx_ei = d_Vbex_dV_bx_ei;
dv = (Vbex+dv0);
{
double value_sqrt_0 = sqrt(((dv*dv)+((4.0*(model_.aje))*(model_.aje))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_mv_dTemp_dt_GND = (deriv_sqrt_0_d0*((dv*d_dv_dTemp_dt_GND+d_dv_dTemp_dt_GND*dv)));
d_mv_dV_bx_ei = (deriv_sqrt_0_d0*((dv*d_dv_dV_bx_ei+d_dv_dV_bx_ei*dv)));
mv = value_sqrt_0;
}

d_vl_dTemp_dt_GND = (0.5*(d_dv_dTemp_dt_GND-d_mv_dTemp_dt_GND)-d_dv0_dTemp_dt_GND);
d_vl_dV_bx_ei = 0.5*(d_dv_dV_bx_ei-d_mv_dV_bx_ei);
vl = ((0.5*(dv-mv))-dv0);
{
double value_pow_0 = pow((1.0-(vl/pe_t)),(1.0-(model_.me)));
double  deriv_pow_0_d0 = (((1.0-(vl/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.me))/(1.0-(vl/pe_t))));

d_qlo_dV_bx_ei = ((-pe_t)*(deriv_pow_0_d0*((-(d_vl_dV_bx_ei/pe_t))))/(1.0-(model_.me)));
d_qlo_dTemp_dt_GND = (((-pe_t)*(deriv_pow_0_d0*((-((pe_t*d_vl_dTemp_dt_GND-vl*d_pe_t_dTemp_dt_GND)/pe_t/pe_t))))+(-d_pe_t_dTemp_dt_GND)*value_pow_0)/(1.0-(model_.me)));
qlo = (((-pe_t)*value_pow_0)/(1.0-(model_.me)));
}
{
double value_pow_0 = pow((1.0-(model_.fc)),(-(model_.me)));

d_qdbex_dTemp_dt_GND = ((d_qlo_dTemp_dt_GND+((value_pow_0*((Vbex-vl)+vl0))*(((pe_t*(1.0-(model_.fc)))*(0.5*(model_.me))*((-d_vl_dTemp_dt_GND)+d_vl0_dTemp_dt_GND)-((0.5*(model_.me))*((Vbex-vl)+vl0))*d_pe_t_dTemp_dt_GND*(1.0-(model_.fc)))/(pe_t*(1.0-(model_.fc)))/(pe_t*(1.0-(model_.fc))))+value_pow_0*((-d_vl_dTemp_dt_GND)+d_vl0_dTemp_dt_GND)*(1.0+(((0.5*(model_.me))*((Vbex-vl)+vl0))/(pe_t*(1.0-(model_.fc)))))))-d_q0_dTemp_dt_GND);
d_qdbex_dV_bx_ei = (d_qlo_dV_bx_ei+((value_pow_0*((Vbex-vl)+vl0))*((0.5*(model_.me))*(d_Vbex_dV_bx_ei-d_vl_dV_bx_ei)/(pe_t*(1.0-(model_.fc))))+value_pow_0*(d_Vbex_dV_bx_ei-d_vl_dV_bx_ei)*(1.0+(((0.5*(model_.me))*((Vbex-vl)+vl0))/(pe_t*(1.0-(model_.fc)))))));
qdbex = ((qlo+((value_pow_0*((Vbex-vl)+vl0))*(1.0+(((0.5*(model_.me))*((Vbex-vl)+vl0))/(pe_t*(1.0-(model_.fc)))))))-q0);
}
}
}
// End block qdbexBlock
//Begin block qdbepBlock
{
//Block-local variables for block qdbepBlock
double dv0=0.0;
     double d_dv0_dTemp_dt_GND=0.0;
double dvh=0.0;
     double d_dvh_dV_bx_bp=0.0;
     double d_dvh_dTemp_dt_GND=0.0;
double pwq=0.0;
double qlo=0.0;
     double d_qlo_dV_bx_bp=0.0;
     double d_qlo_dTemp_dt_GND=0.0;
double qhi=0.0;
     double d_qhi_dV_bx_bp=0.0;
     double d_qhi_dTemp_dt_GND=0.0;
double vn0=0.0;
     double d_vn0_dTemp_dt_GND=0.0;
double vnl0=0.0;
     double d_vnl0_dTemp_dt_GND=0.0;
double vl0=0.0;
     double d_vl0_dTemp_dt_GND=0.0;
double qlo0=0.0;
     double d_qlo0_dTemp_dt_GND=0.0;
double vn=0.0;
     double d_vn_dV_bx_bp=0.0;
     double d_vn_dTemp_dt_GND=0.0;
double vnl=0.0;
     double d_vnl_dV_bx_bp=0.0;
     double d_vnl_dTemp_dt_GND=0.0;
double vl=0.0;
     double d_vl_dV_bx_bp=0.0;
     double d_vl_dTemp_dt_GND=0.0;
double sel=0.0;
     double d_sel_dV_bx_bp=0.0;
     double d_sel_dTemp_dt_GND=0.0;
double crt=0.0;
     double d_crt_dTemp_dt_GND=0.0;
double cmx=0.0;
     double d_cmx_dTemp_dt_GND=0.0;
double cl=0.0;
     double d_cl_dV_bx_bp=0.0;
     double d_cl_dTemp_dt_GND=0.0;
double ql=0.0;
     double d_ql_dV_bx_bp=0.0;
     double d_ql_dTemp_dt_GND=0.0;
double mv0=0.0;
     double d_mv0_dTemp_dt_GND=0.0;
double q0=0.0;
     double d_q0_dTemp_dt_GND=0.0;
double dv=0.0;
     double d_dv_dV_bx_bp=0.0;
     double d_dv_dTemp_dt_GND=0.0;
double mv=0.0;
     double d_mv_dV_bx_bp=0.0;
     double d_mv_dTemp_dt_GND=0.0;
//End of Block-local variables

d_dv0_dTemp_dt_GND = (-d_pc_t_dTemp_dt_GND)*(model_.fc);
dv0 = ((-pc_t)*(model_.fc));
if (((model_.ajc)<=0.0))
{

d_dvh_dTemp_dt_GND = d_dv0_dTemp_dt_GND;
d_dvh_dV_bx_bp = d_Vbep_dV_bx_bp;
dvh = (Vbep+dv0);
if ((dvh>0.0))
{
{
double value_pow_0 = pow((1.0-(model_.fc)),((-1.0)-(model_.mc)));
pwq = value_pow_0;
}

d_qlo_dV_bx_bp =  0.0;
d_qlo_dTemp_dt_GND = (d_pc_t_dTemp_dt_GND*(1.0-((pwq*(1.0-(model_.fc)))*(1.0-(model_.fc))))/(1.0-(model_.mc)));
qlo = ((pc_t*(1.0-((pwq*(1.0-(model_.fc)))*(1.0-(model_.fc)))))/(1.0-(model_.mc)));

d_qhi_dTemp_dt_GND = (dvh*((pc_t*(0.5*(model_.mc))*d_dvh_dTemp_dt_GND-((0.5*(model_.mc))*dvh)*d_pc_t_dTemp_dt_GND)/pc_t/pc_t)+d_dvh_dTemp_dt_GND*((1.0-(model_.fc))+(((0.5*(model_.mc))*dvh)/pc_t)))*pwq;
d_qhi_dV_bx_bp = (dvh*((0.5*(model_.mc))*d_dvh_dV_bx_bp/pc_t)+d_dvh_dV_bx_bp*((1.0-(model_.fc))+(((0.5*(model_.mc))*dvh)/pc_t)))*pwq;
qhi = ((dvh*((1.0-(model_.fc))+(((0.5*(model_.mc))*dvh)/pc_t)))*pwq);
}
else
{
if ((((model_.vrt)>0.0)&&(Vbep<(-(model_.vrt)))))
{
{
double value_pow_0 = pow((1.0+((model_.vrt)/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0+((model_.vrt)/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0+((model_.vrt)/pc_t))));

d_qlo_dV_bx_bp = (pc_t*(-value_pow_0*(-((1.0-(model_.mc))*d_Vbep_dV_bx_bp/(pc_t+(model_.vrt)))))/(1.0-(model_.mc)));
d_qlo_dTemp_dt_GND = ((pc_t*(-(value_pow_0*(-(-((1.0-(model_.mc))*(Vbep+(model_.vrt)))*d_pc_t_dTemp_dt_GND/(pc_t+(model_.vrt))/(pc_t+(model_.vrt))))+(deriv_pow_0_d0*((-(model_.vrt)*d_pc_t_dTemp_dt_GND/pc_t/pc_t)))*(1.0-(((1.0-(model_.mc))*(Vbep+(model_.vrt)))/(pc_t+(model_.vrt))))))+d_pc_t_dTemp_dt_GND*(1.0-(value_pow_0*(1.0-(((1.0-(model_.mc))*(Vbep+(model_.vrt)))/(pc_t+(model_.vrt)))))))/(1.0-(model_.mc)));
qlo = ((pc_t*(1.0-(value_pow_0*(1.0-(((1.0-(model_.mc))*(Vbep+(model_.vrt)))/(pc_t+(model_.vrt)))))))/(1.0-(model_.mc)));
}
}
else
{
{
double value_pow_0 = pow((1.0-(Vbep/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0-(Vbep/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0-(Vbep/pc_t))));

d_qlo_dV_bx_bp = (pc_t*(-(deriv_pow_0_d0*((-(d_Vbep_dV_bx_bp/pc_t)))))/(1.0-(model_.mc)));
d_qlo_dTemp_dt_GND = ((pc_t*(-(deriv_pow_0_d0*((-(-Vbep*d_pc_t_dTemp_dt_GND/pc_t/pc_t)))))+d_pc_t_dTemp_dt_GND*(1.0-value_pow_0))/(1.0-(model_.mc)));
qlo = ((pc_t*(1.0-value_pow_0))/(1.0-(model_.mc)));
}
}

d_qhi_dV_bx_bp = d_qhi_dTemp_dt_GND =  0.0;
qhi = 0.0;
}

d_qdbep_dTemp_dt_GND = (d_qlo_dTemp_dt_GND+d_qhi_dTemp_dt_GND);
d_qdbep_dV_bx_bp = (d_qlo_dV_bx_bp+d_qhi_dV_bx_bp);
qdbep = (qlo+qhi);
}
else
{
if ((((model_.vrt)>0.0)&&((model_.art)>0.0)))
{

d_vn0_dTemp_dt_GND = ((((model_.vrt)-dv0)*d_dv0_dTemp_dt_GND-((model_.vrt)+dv0)*(-d_dv0_dTemp_dt_GND))/((model_.vrt)-dv0)/((model_.vrt)-dv0));
vn0 = (((model_.vrt)+dv0)/((model_.vrt)-dv0));
{
double value_sqrt_0 = sqrt((((vn0-1.0)*(vn0-1))+((4*(model_.ajc))*(model_.ajc))));
double value_sqrt_1 = sqrt((((vn0+1.0)*(vn0+1))+((4*(model_.art))*(model_.art))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);

d_vnl0_dTemp_dt_GND = (((value_sqrt_0+value_sqrt_1)*2.0*d_vn0_dTemp_dt_GND-(2.0*vn0)*((deriv_sqrt_0_d0*(((vn0-1.0)*d_vn0_dTemp_dt_GND+d_vn0_dTemp_dt_GND*(vn0-1))))+(deriv_sqrt_1_d0*(((vn0+1.0)*d_vn0_dTemp_dt_GND+d_vn0_dTemp_dt_GND*(vn0+1))))))/(value_sqrt_0+value_sqrt_1)/(value_sqrt_0+value_sqrt_1));
vnl0 = ((2.0*vn0)/(value_sqrt_0+value_sqrt_1));
}

d_vl0_dTemp_dt_GND = 0.5*((vnl0*(-d_dv0_dTemp_dt_GND)+d_vnl0_dTemp_dt_GND*((model_.vrt)-dv0))-d_dv0_dTemp_dt_GND);
vl0 = (0.5*(((vnl0*((model_.vrt)-dv0))-(model_.vrt))-dv0));
{
double value_pow_0 = pow((1.0-(vl0/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0-(vl0/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0-(vl0/pc_t))));

d_qlo0_dTemp_dt_GND = ((pc_t*(-(deriv_pow_0_d0*((-((pc_t*d_vl0_dTemp_dt_GND-vl0*d_pc_t_dTemp_dt_GND)/pc_t/pc_t)))))+d_pc_t_dTemp_dt_GND*(1.0-value_pow_0))/(1.0-(model_.mc)));
qlo0 = ((pc_t*(1.0-value_pow_0))/(1.0-(model_.mc)));
}

d_vn_dTemp_dt_GND = ((((model_.vrt)-dv0)*d_dv0_dTemp_dt_GND-(((2*Vbep)+(model_.vrt))+dv0)*(-d_dv0_dTemp_dt_GND))/((model_.vrt)-dv0)/((model_.vrt)-dv0));
d_vn_dV_bx_bp = (2*d_Vbep_dV_bx_bp/((model_.vrt)-dv0));
vn = ((((2*Vbep)+(model_.vrt))+dv0)/((model_.vrt)-dv0));
{
double value_sqrt_0 = sqrt((((vn-1.0)*(vn-1))+((4*(model_.ajc))*(model_.ajc))));
double value_sqrt_1 = sqrt((((vn+1.0)*(vn+1))+((4*(model_.art))*(model_.art))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);

d_vnl_dTemp_dt_GND = (((value_sqrt_0+value_sqrt_1)*2.0*d_vn_dTemp_dt_GND-(2.0*vn)*((deriv_sqrt_0_d0*(((vn-1.0)*d_vn_dTemp_dt_GND+d_vn_dTemp_dt_GND*(vn-1))))+(deriv_sqrt_1_d0*(((vn+1.0)*d_vn_dTemp_dt_GND+d_vn_dTemp_dt_GND*(vn+1))))))/(value_sqrt_0+value_sqrt_1)/(value_sqrt_0+value_sqrt_1));
d_vnl_dV_bx_bp = (((value_sqrt_0+value_sqrt_1)*2.0*d_vn_dV_bx_bp-(2.0*vn)*((deriv_sqrt_0_d0*(((vn-1.0)*d_vn_dV_bx_bp+d_vn_dV_bx_bp*(vn-1))))+(deriv_sqrt_1_d0*(((vn+1.0)*d_vn_dV_bx_bp+d_vn_dV_bx_bp*(vn+1))))))/(value_sqrt_0+value_sqrt_1)/(value_sqrt_0+value_sqrt_1));
vnl = ((2.0*vn)/(value_sqrt_0+value_sqrt_1));
}

d_vl_dTemp_dt_GND = 0.5*((vnl*(-d_dv0_dTemp_dt_GND)+d_vnl_dTemp_dt_GND*((model_.vrt)-dv0))-d_dv0_dTemp_dt_GND);
d_vl_dV_bx_bp = 0.5*d_vnl_dV_bx_bp*((model_.vrt)-dv0);
vl = (0.5*(((vnl*((model_.vrt)-dv0))-(model_.vrt))-dv0));
{
double value_pow_0 = pow((1.0-(vl/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0-(vl/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0-(vl/pc_t))));

d_qlo_dV_bx_bp = (pc_t*(-(deriv_pow_0_d0*((-(d_vl_dV_bx_bp/pc_t)))))/(1.0-(model_.mc)));
d_qlo_dTemp_dt_GND = ((pc_t*(-(deriv_pow_0_d0*((-((pc_t*d_vl_dTemp_dt_GND-vl*d_pc_t_dTemp_dt_GND)/pc_t/pc_t)))))+d_pc_t_dTemp_dt_GND*(1.0-value_pow_0))/(1.0-(model_.mc)));
qlo = ((pc_t*(1.0-value_pow_0))/(1.0-(model_.mc)));
}

d_sel_dTemp_dt_GND = 0.5*d_vnl_dTemp_dt_GND;
d_sel_dV_bx_bp = 0.5*d_vnl_dV_bx_bp;
sel = (0.5*(vnl+1.0));
{
double value_pow_0 = pow((1.0+((model_.vrt)/pc_t)),(-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0+((model_.vrt)/pc_t)) == 0.0)?0.0:(value_pow_0*(-(model_.mc))/(1.0+((model_.vrt)/pc_t))));

d_crt_dTemp_dt_GND = (deriv_pow_0_d0*((-(model_.vrt)*d_pc_t_dTemp_dt_GND/pc_t/pc_t)));
crt = value_pow_0;
}
{
double value_pow_0 = pow((1.0+(dv0/pc_t)),(-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0+(dv0/pc_t)) == 0.0)?0.0:(value_pow_0*(-(model_.mc))/(1.0+(dv0/pc_t))));

d_cmx_dTemp_dt_GND = (deriv_pow_0_d0*(((pc_t*d_dv0_dTemp_dt_GND-dv0*d_pc_t_dTemp_dt_GND)/pc_t/pc_t)));
cmx = value_pow_0;
}

d_cl_dTemp_dt_GND = (((1.0-sel)*d_crt_dTemp_dt_GND+(-d_sel_dTemp_dt_GND)*crt)+(sel*d_cmx_dTemp_dt_GND+d_sel_dTemp_dt_GND*cmx));
d_cl_dV_bx_bp = ((-d_sel_dV_bx_bp)*crt+d_sel_dV_bx_bp*cmx);
cl = (((1.0-sel)*crt)+(sel*cmx));

d_ql_dTemp_dt_GND = (((Vbep-vl)+vl0)*d_cl_dTemp_dt_GND+((-d_vl_dTemp_dt_GND)+d_vl0_dTemp_dt_GND)*cl);
d_ql_dV_bx_bp = (((Vbep-vl)+vl0)*d_cl_dV_bx_bp+(d_Vbep_dV_bx_bp-d_vl_dV_bx_bp)*cl);
ql = (((Vbep-vl)+vl0)*cl);

d_qdbep_dTemp_dt_GND = ((d_ql_dTemp_dt_GND+d_qlo_dTemp_dt_GND)-d_qlo0_dTemp_dt_GND);
d_qdbep_dV_bx_bp = (d_ql_dV_bx_bp+d_qlo_dV_bx_bp);
qdbep = ((ql+qlo)-qlo0);
}
else
{
{
double value_sqrt_0 = sqrt(((dv0*dv0)+((4*(model_.ajc))*(model_.ajc))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_mv0_dTemp_dt_GND = (deriv_sqrt_0_d0*((dv0*d_dv0_dTemp_dt_GND+d_dv0_dTemp_dt_GND*dv0)));
mv0 = value_sqrt_0;
}

d_vl0_dTemp_dt_GND = (-0.5)*(d_dv0_dTemp_dt_GND+d_mv0_dTemp_dt_GND);
vl0 = ((-0.5)*(dv0+mv0));
{
double value_pow_0 = pow((1.0-(vl0/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0-(vl0/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0-(vl0/pc_t))));

d_q0_dTemp_dt_GND = (((-pc_t)*(deriv_pow_0_d0*((-((pc_t*d_vl0_dTemp_dt_GND-vl0*d_pc_t_dTemp_dt_GND)/pc_t/pc_t))))+(-d_pc_t_dTemp_dt_GND)*value_pow_0)/(1.0-(model_.mc)));
q0 = (((-pc_t)*value_pow_0)/(1.0-(model_.mc)));
}

d_dv_dTemp_dt_GND = d_dv0_dTemp_dt_GND;
d_dv_dV_bx_bp = d_Vbep_dV_bx_bp;
dv = (Vbep+dv0);
{
double value_sqrt_0 = sqrt(((dv*dv)+((4*(model_.ajc))*(model_.ajc))));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);

d_mv_dTemp_dt_GND = (deriv_sqrt_0_d0*((dv*d_dv_dTemp_dt_GND+d_dv_dTemp_dt_GND*dv)));
d_mv_dV_bx_bp = (deriv_sqrt_0_d0*((dv*d_dv_dV_bx_bp+d_dv_dV_bx_bp*dv)));
mv = value_sqrt_0;
}

d_vl_dTemp_dt_GND = (0.5*(d_dv_dTemp_dt_GND-d_mv_dTemp_dt_GND)-d_dv0_dTemp_dt_GND);
d_vl_dV_bx_bp = 0.5*(d_dv_dV_bx_bp-d_mv_dV_bx_bp);
vl = ((0.5*(dv-mv))-dv0);
{
double value_pow_0 = pow((1.0-(vl/pc_t)),(1.0-(model_.mc)));
double  deriv_pow_0_d0 = (((1.0-(vl/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-(model_.mc))/(1.0-(vl/pc_t))));

d_qlo_dV_bx_bp = ((-pc_t)*(deriv_pow_0_d0*((-(d_vl_dV_bx_bp/pc_t))))/(1.0-(model_.mc)));
d_qlo_dTemp_dt_GND = (((-pc_t)*(deriv_pow_0_d0*((-((pc_t*d_vl_dTemp_dt_GND-vl*d_pc_t_dTemp_dt_GND)/pc_t/pc_t))))+(-d_pc_t_dTemp_dt_GND)*value_pow_0)/(1.0-(model_.mc)));
qlo = (((-pc_t)*value_pow_0)/(1.0-(model_.mc)));
}
{
double value_pow_0 = pow((1.0-(model_.fc)),(-(model_.mc)));

d_qdbep_dTemp_dt_GND = ((d_qlo_dTemp_dt_GND+value_pow_0*((-d_vl_dTemp_dt_GND)+d_vl0_dTemp_dt_GND))-d_q0_dTemp_dt_GND);
d_qdbep_dV_bx_bp = (d_qlo_dV_bx_bp+value_pow_0*(d_Vbep_dV_bx_bp-d_vl_dV_bx_bp));
qdbep = ((qlo+(value_pow_0*((Vbep-vl)+vl0)))-q0);
}
}
}
}
// End block qdbepBlock

d_sgIf_dV_bi_ei = ((Ifi>0.0)?0.0:0.0);
d_sgIf_dTemp_dt_GND = ((Ifi>0.0)?0.0:0.0);
sgIf = ((Ifi>0.0)?1.0:0.0);

d_rIf_dV_bi_ei = (Ifi*d_sgIf_dV_bi_ei+d_Ifi_dV_bi_ei*sgIf)*(model_.Iitf);
d_rIf_dTemp_dt_GND = (Ifi*d_sgIf_dTemp_dt_GND+d_Ifi_dTemp_dt_GND*sgIf)*(model_.Iitf);
rIf = ((Ifi*sgIf)*(model_.Iitf));

d_mIf_dV_bi_ei = (((rIf+1.0)*d_rIf_dV_bi_ei-rIf*d_rIf_dV_bi_ei)/(rIf+1.0)/(rIf+1.0));
d_mIf_dTemp_dt_GND = (((rIf+1.0)*d_rIf_dTemp_dt_GND-rIf*d_rIf_dTemp_dt_GND)/(rIf+1.0)/(rIf+1.0));
mIf = (rIf/(rIf+1.0));

d_arg_dV_bi_cx = d_arg_dV_bx_bp = d_arg_dV_bi_ei = d_arg_dTemp_dt_GND =  0.0;
d_arg_dV_bi_ci = (d_Vbci_dV_bi_ci*(model_.Ivtf)/1.44);
arg = ((Vbci*(model_.Ivtf))/1.44);
if ((arg<(model_.VmaxExp)))
{
{
double value_exp_0 = exp(arg);
double  deriv_exp_0_d0 = value_exp_0;

d_expi_dV_bx_ei = d_expi_dV_si_bp =  0.0;
d_expi_dV_bi_ci = (deriv_exp_0_d0*(d_arg_dV_bi_ci));
d_expi_dTemp_dt_GND = (deriv_exp_0_d0*(d_arg_dTemp_dt_GND));
d_expi_dV_bi_ei = (deriv_exp_0_d0*(d_arg_dV_bi_ei));
d_expi_dV_bx_bp = (deriv_exp_0_d0*(d_arg_dV_bx_bp));
d_expi_dV_bi_cx = (deriv_exp_0_d0*(d_arg_dV_bi_cx));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((model_.VmaxExp));

d_expi_dV_bx_ei = d_expi_dV_si_bp =  0.0;
d_expi_dV_bi_ci = value_exp_0*d_arg_dV_bi_ci;
d_expi_dTemp_dt_GND = value_exp_0*d_arg_dTemp_dt_GND;
d_expi_dV_bi_ei = value_exp_0*d_arg_dV_bi_ei;
d_expi_dV_bx_bp = value_exp_0*d_arg_dV_bx_bp;
d_expi_dV_bi_cx = value_exp_0*d_arg_dV_bi_cx;
expi = (value_exp_0*(1.0+(arg-(model_.VmaxExp))));
}
}

d_tff_dV_bx_bp = ((model_.tf)*(1.0+((model_.qtf)*q1)))*(model_.xtf)*d_expi_dV_bx_bp*((model_.sltf)+(mIf*mIf))*sgIf;
d_tff_dV_si_bp = ((model_.tf)*(1.0+((model_.qtf)*q1)))*(model_.xtf)*d_expi_dV_si_bp*((model_.sltf)+(mIf*mIf))*sgIf;
d_tff_dV_bx_ei = ((model_.tf)*(1.0+((model_.qtf)*q1)))*(model_.xtf)*d_expi_dV_bx_ei*((model_.sltf)+(mIf*mIf))*sgIf;
d_tff_dV_bi_cx = ((model_.tf)*(1.0+((model_.qtf)*q1)))*(model_.xtf)*d_expi_dV_bi_cx*((model_.sltf)+(mIf*mIf))*sgIf;
d_tff_dV_bi_ci = (((model_.tf)*(1.0+((model_.qtf)*q1)))*(model_.xtf)*d_expi_dV_bi_ci*((model_.sltf)+(mIf*mIf))*sgIf+(model_.tf)*(model_.qtf)*d_q1_dV_bi_ci*(1.0+((((model_.xtf)*expi)*((model_.sltf)+(mIf*mIf)))*sgIf)));
d_tff_dTemp_dt_GND = (((model_.tf)*(1.0+((model_.qtf)*q1)))*((((model_.xtf)*expi)*((model_.sltf)+(mIf*mIf)))*d_sgIf_dTemp_dt_GND+(((model_.xtf)*expi)*(mIf*d_mIf_dTemp_dt_GND+d_mIf_dTemp_dt_GND*mIf)+(model_.xtf)*d_expi_dTemp_dt_GND*((model_.sltf)+(mIf*mIf)))*sgIf)+(model_.tf)*(model_.qtf)*d_q1_dTemp_dt_GND*(1.0+((((model_.xtf)*expi)*((model_.sltf)+(mIf*mIf)))*sgIf)));
d_tff_dV_bi_ei = (((model_.tf)*(1.0+((model_.qtf)*q1)))*((((model_.xtf)*expi)*((model_.sltf)+(mIf*mIf)))*d_sgIf_dV_bi_ei+(((model_.xtf)*expi)*(mIf*d_mIf_dV_bi_ei+d_mIf_dV_bi_ei*mIf)+(model_.xtf)*d_expi_dV_bi_ei*((model_.sltf)+(mIf*mIf)))*sgIf)+(model_.tf)*(model_.qtf)*d_q1_dV_bi_ei*(1.0+((((model_.xtf)*expi)*((model_.sltf)+(mIf*mIf)))*sgIf)));
tff = (((model_.tf)*(1.0+((model_.qtf)*q1)))*(1.0+((((model_.xtf)*expi)*((model_.sltf)+(mIf*mIf)))*sgIf)));

d_Qbe_dV_bx_bp = (d_tff_dV_bx_bp*Ifi/qb);
d_Qbe_dV_si_bp = (d_tff_dV_si_bp*Ifi/qb);
d_Qbe_dV_bx_ei = (d_tff_dV_bx_ei*Ifi/qb);
d_Qbe_dV_bi_cx = (d_tff_dV_bi_cx*Ifi/qb);
d_Qbe_dV_bi_ci = ((qb*d_tff_dV_bi_ci*Ifi-(tff*Ifi)*d_qb_dV_bi_ci)/qb/qb);
d_Qbe_dV_bi_ei = (cje_t*d_qdbe_dV_bi_ei*(model_.wbe)+((qb*(tff*d_Ifi_dV_bi_ei+d_tff_dV_bi_ei*Ifi)-(tff*Ifi)*d_qb_dV_bi_ei)/qb/qb));
d_Qbe_dTemp_dt_GND = ((cje_t*d_qdbe_dTemp_dt_GND+d_cje_t_dTemp_dt_GND*qdbe)*(model_.wbe)+((qb*(tff*d_Ifi_dTemp_dt_GND+d_tff_dTemp_dt_GND*Ifi)-(tff*Ifi)*d_qb_dTemp_dt_GND)/qb/qb));
Qbe = (((cje_t*qdbe)*(model_.wbe))+((tff*Ifi)/qb));

d_Qbex_dV_bx_ei = cje_t*d_qdbex_dV_bx_ei*(1.0-(model_.wbe));
d_Qbex_dTemp_dt_GND = (cje_t*d_qdbex_dTemp_dt_GND+d_cje_t_dTemp_dt_GND*qdbex)*(1.0-(model_.wbe));
Qbex = ((cje_t*qdbex)*(1.0-(model_.wbe)));

d_Qbc_dV_bx_bp = (model_.qco)*d_Kbci_dV_bx_bp;
d_Qbc_dV_si_bp = (model_.qco)*d_Kbci_dV_si_bp;
d_Qbc_dV_bx_ei = (model_.qco)*d_Kbci_dV_bx_ei;
d_Qbc_dV_bi_ei = ((model_.tr)*d_Iri_dV_bi_ei+(model_.qco)*d_Kbci_dV_bi_ei);
d_Qbc_dV_bi_ci = ((cjc_t*d_qdbc_dV_bi_ci+(model_.tr)*d_Iri_dV_bi_ci)+(model_.qco)*d_Kbci_dV_bi_ci);
d_Qbc_dTemp_dt_GND = (((cjc_t*d_qdbc_dTemp_dt_GND+d_cjc_t_dTemp_dt_GND*qdbc)+(model_.tr)*d_Iri_dTemp_dt_GND)+(model_.qco)*d_Kbci_dTemp_dt_GND);
Qbc = (((cjc_t*qdbc)+((model_.tr)*Iri))+((model_.qco)*Kbci));

d_Qbcx_dV_bi_ci = (model_.qco)*d_Kbcx_dV_bi_ci;
d_Qbcx_dV_bi_ei = (model_.qco)*d_Kbcx_dV_bi_ei;
d_Qbcx_dV_bx_bp = (model_.qco)*d_Kbcx_dV_bx_bp;
d_Qbcx_dV_bi_cx = (model_.qco)*d_Kbcx_dV_bi_cx;
d_Qbcx_dTemp_dt_GND = (model_.qco)*d_Kbcx_dTemp_dt_GND;
Qbcx = ((model_.qco)*Kbcx);

d_Qbep_dV_bi_ei = (model_.tr)*d_Ifp_dV_bi_ei;
d_Qbep_dV_bi_ci = (model_.tr)*d_Ifp_dV_bi_ci;
d_Qbep_dV_bx_bp = (cjep_t*d_qdbep_dV_bx_bp+(model_.tr)*d_Ifp_dV_bx_bp);
d_Qbep_dTemp_dt_GND = ((cjep_t*d_qdbep_dTemp_dt_GND+d_cjep_t_dTemp_dt_GND*qdbep)+(model_.tr)*d_Ifp_dTemp_dt_GND);
Qbep = ((cjep_t*qdbep)+((model_.tr)*Ifp));

d_Qbcp_dV_si_bp = (cjcp_t*d_qdbcp_dV_si_bp+(model_.ccso)*d_Vbcp_dV_si_bp);
d_Qbcp_dTemp_dt_GND = (cjcp_t*d_qdbcp_dTemp_dt_GND+d_cjcp_t_dTemp_dt_GND*qdbcp);
Qbcp = ((cjcp_t*qdbcp)+((model_.ccso)*Vbcp));

d_Qbeo_dV_b_e = d_Vbe_dV_b_e*(model_.cbeo);
Qbeo = (Vbe*(model_.cbeo));

d_Qbco_dV_b_c = d_Vbc_dV_b_c*(model_.cbco);
Qbco = (Vbc*(model_.cbco));

d_Qcth_dTemp_dt_GND = d_dt_et_dTemp_dt_GND*(model_.cth);
Qcth = (dt_et*(model_.cth));

d_Qxf1_dV_xf1_GND = (model_.td)*d_Vxf1_dV_xf1_GND;
Qxf1 = ((model_.td)*Vxf1);

d_Qxf2_dV_xf2_GND = (model_.td)*d_Vxf2_dV_xf2_GND*0.3333333333333333;
Qxf2 = (((model_.td)*Vxf2)*0.3333333333333333);

d_Qbe_dV_bx_bp = ((model_.VBICtype)*mMod)*d_Qbe_dV_bx_bp;
d_Qbe_dV_si_bp = ((model_.VBICtype)*mMod)*d_Qbe_dV_si_bp;
d_Qbe_dV_bx_ei = ((model_.VBICtype)*mMod)*d_Qbe_dV_bx_ei;
d_Qbe_dV_bi_cx = ((model_.VBICtype)*mMod)*d_Qbe_dV_bi_cx;
d_Qbe_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Qbe_dV_bi_ci;
d_Qbe_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Qbe_dV_bi_ei;
d_Qbe_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Qbe_dTemp_dt_GND;
Qbe = (((model_.VBICtype)*mMod)*Qbe);

d_Qbex_dV_bx_ei = ((model_.VBICtype)*mMod)*d_Qbex_dV_bx_ei;
d_Qbex_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Qbex_dTemp_dt_GND;
Qbex = (((model_.VBICtype)*mMod)*Qbex);

d_Qbc_dV_bx_bp = ((model_.VBICtype)*mMod)*d_Qbc_dV_bx_bp;
d_Qbc_dV_si_bp = ((model_.VBICtype)*mMod)*d_Qbc_dV_si_bp;
d_Qbc_dV_bx_ei = ((model_.VBICtype)*mMod)*d_Qbc_dV_bx_ei;
d_Qbc_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Qbc_dV_bi_ei;
d_Qbc_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Qbc_dV_bi_ci;
d_Qbc_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Qbc_dTemp_dt_GND;
Qbc = (((model_.VBICtype)*mMod)*Qbc);

d_Qbcx_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Qbcx_dV_bi_ci;
d_Qbcx_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Qbcx_dV_bi_ei;
d_Qbcx_dV_bx_bp = ((model_.VBICtype)*mMod)*d_Qbcx_dV_bx_bp;
d_Qbcx_dV_bi_cx = ((model_.VBICtype)*mMod)*d_Qbcx_dV_bi_cx;
d_Qbcx_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Qbcx_dTemp_dt_GND;
Qbcx = (((model_.VBICtype)*mMod)*Qbcx);

d_Qbep_dV_bi_ei = ((model_.VBICtype)*mMod)*d_Qbep_dV_bi_ei;
d_Qbep_dV_bi_ci = ((model_.VBICtype)*mMod)*d_Qbep_dV_bi_ci;
d_Qbep_dV_bx_bp = ((model_.VBICtype)*mMod)*d_Qbep_dV_bx_bp;
d_Qbep_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Qbep_dTemp_dt_GND;
Qbep = (((model_.VBICtype)*mMod)*Qbep);

d_Qbeo_dV_b_e = mMod*d_Qbeo_dV_b_e;
Qbeo = (mMod*Qbeo);

d_Qbco_dV_b_c = mMod*d_Qbco_dV_b_c;
Qbco = (mMod*Qbco);

d_Qbcp_dV_si_bp = ((model_.VBICtype)*mMod)*d_Qbcp_dV_si_bp;
d_Qbcp_dTemp_dt_GND = ((model_.VBICtype)*mMod)*d_Qbcp_dTemp_dt_GND;
Qbcp = (((model_.VBICtype)*mMod)*Qbcp);

d_Qcth_dTemp_dt_GND = mMod*d_Qcth_dTemp_dt_GND;
Qcth = (mMod*Qcth);
}
// End block evaluateDynamic
//Begin block loadStatic
{
// I(bi,ei) <+ (Ibe)
{
double contribTemp;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dV_si_bp;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dTemp_dt_GND;
double d_contribTemp_dV_bx_ei;
contribTemp= Ibe;
d_contribTemp_dV_bx_bp = d_Ibe_dV_bx_bp;
d_contribTemp_dV_si_bp = d_Ibe_dV_si_bp;
d_contribTemp_dV_bi_ci = d_Ibe_dV_bi_ci;
d_contribTemp_dV_bi_ei = d_Ibe_dV_bi_ei;
d_contribTemp_dTemp_dt_GND = d_Ibe_dTemp_dt_GND;
d_contribTemp_dV_bx_ei = d_Ibe_dV_bx_ei;
staticContributions[admsNodeID_bi] += contribTemp;
d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_bi][admsProbeID_V_si_bp] += d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_ei] += d_contribTemp_dV_bx_ei;
staticContributions[admsNodeID_ei] -= contribTemp;
d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_ei][admsProbeID_V_si_bp] -= d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_ei] -= d_contribTemp_dV_bx_ei;

Jdxp_static[admsNodeID_bi] += d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei];
Jdxp_static[admsNodeID_ei] -= d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei];
}
// I(bx,ei) <+ (Ibex)
{
double contribTemp;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dV_si_bp;
double d_contribTemp_dV_bx_ei;
double d_contribTemp_dTemp_dt_GND;
contribTemp= Ibex;
d_contribTemp_dV_bi_ei = d_Ibex_dV_bi_ei;
d_contribTemp_dV_bi_ci = d_Ibex_dV_bi_ci;
d_contribTemp_dV_bx_bp = d_Ibex_dV_bx_bp;
d_contribTemp_dV_si_bp = d_Ibex_dV_si_bp;
d_contribTemp_dV_bx_ei = d_Ibex_dV_bx_ei;
d_contribTemp_dTemp_dt_GND = d_Ibex_dTemp_dt_GND;
staticContributions[admsNodeID_bx] += contribTemp;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_bx][admsProbeID_V_si_bp] += d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_ei] += d_contribTemp_dV_bx_ei;
d_staticContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
staticContributions[admsNodeID_ei] -= contribTemp;
d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_ei][admsProbeID_V_si_bp] -= d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_ei] -= d_contribTemp_dV_bx_ei;
d_staticContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_static[admsNodeID_bx] += d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_ei] -= d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(ci,ei) <+ (Itxf)
staticContributions[admsNodeID_ci] += Itxf;
d_staticContributions[admsNodeID_ci][admsProbeID_V_xf2_GND] += d_Itxf_dV_xf2_GND;
staticContributions[admsNodeID_ei] -= Itxf;
d_staticContributions[admsNodeID_ei][admsProbeID_V_xf2_GND] -= d_Itxf_dV_xf2_GND;
// I(ei,ci) <+ (Itzr)
{
double contribTemp;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dTemp_dt_GND;
contribTemp= Itzr;
d_contribTemp_dV_bi_ei = d_Itzr_dV_bi_ei;
d_contribTemp_dV_bi_ci = d_Itzr_dV_bi_ci;
d_contribTemp_dTemp_dt_GND = d_Itzr_dTemp_dt_GND;
staticContributions[admsNodeID_ei] += contribTemp;
d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
staticContributions[admsNodeID_ci] -= contribTemp;
d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_ci][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_static[admsNodeID_ei] += d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_ci] -= d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(bi,ci) <+ (Ibc)
{
double contribTemp;
double d_contribTemp_dV_xf2_GND;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dV_si_bp;
double d_contribTemp_dV_bx_ei;
double d_contribTemp_dTemp_dt_GND;
contribTemp= Ibc;
d_contribTemp_dV_xf2_GND = d_Ibc_dV_xf2_GND;
d_contribTemp_dV_bi_ei = d_Ibc_dV_bi_ei;
d_contribTemp_dV_bi_ci = d_Ibc_dV_bi_ci;
d_contribTemp_dV_bx_bp = d_Ibc_dV_bx_bp;
d_contribTemp_dV_si_bp = d_Ibc_dV_si_bp;
d_contribTemp_dV_bx_ei = d_Ibc_dV_bx_ei;
d_contribTemp_dTemp_dt_GND = d_Ibc_dTemp_dt_GND;
staticContributions[admsNodeID_bi] += contribTemp;
d_staticContributions[admsNodeID_bi][admsProbeID_V_xf2_GND] += d_contribTemp_dV_xf2_GND;
d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_bi][admsProbeID_V_si_bp] += d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_ei] += d_contribTemp_dV_bx_ei;
d_staticContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
staticContributions[admsNodeID_ci] -= contribTemp;
d_staticContributions[admsNodeID_ci][admsProbeID_V_xf2_GND] -= d_contribTemp_dV_xf2_GND;
d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_ci][admsProbeID_V_si_bp] -= d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_ei] -= d_contribTemp_dV_bx_ei;
d_staticContributions[admsNodeID_ci][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_static[admsNodeID_bi] += d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_ci] -= d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(bx,cx) <+ (Igcx)
{
double contribTemp;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bx_cx;
double d_contribTemp_dTemp_dt_GND;
double d_contribTemp_dV_c_cx;
contribTemp= Igcx;
d_contribTemp_dV_bi_ci = d_Igcx_dV_bi_ci;
d_contribTemp_dV_bx_cx = d_Igcx_dV_bx_cx;
d_contribTemp_dTemp_dt_GND = d_Igcx_dTemp_dt_GND;
d_contribTemp_dV_c_cx = d_Igcx_dV_c_cx;
staticContributions[admsNodeID_bx] += contribTemp;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_cx] += d_contribTemp_dV_bx_cx;
d_staticContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_bx][admsProbeID_V_c_cx] += d_contribTemp_dV_c_cx;
staticContributions[admsNodeID_cx] -= contribTemp;
d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_cx] -= d_contribTemp_dV_bx_cx;
d_staticContributions[admsNodeID_cx][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_cx][admsProbeID_V_c_cx] -= d_contribTemp_dV_c_cx;

Jdxp_static[admsNodeID_bx] += d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_cx*probeDiffs[admsProbeID_V_bx_cx]*d_probeVars[admsProbeID_V_bx_cx][admsProbeID_V_bx_cx]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_cx] -= d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_cx*probeDiffs[admsProbeID_V_bx_cx]*d_probeVars[admsProbeID_V_bx_cx][admsProbeID_V_bx_cx]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(bx,bp) <+ (Ibep)
{
double contribTemp;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dV_si_bp;
double d_contribTemp_dV_bx_ei;
double d_contribTemp_dTemp_dt_GND;
contribTemp= Ibep;
d_contribTemp_dV_bi_ei = d_Ibep_dV_bi_ei;
d_contribTemp_dV_bi_ci = d_Ibep_dV_bi_ci;
d_contribTemp_dV_bx_bp = d_Ibep_dV_bx_bp;
d_contribTemp_dV_si_bp = d_Ibep_dV_si_bp;
d_contribTemp_dV_bx_ei = d_Ibep_dV_bx_ei;
d_contribTemp_dTemp_dt_GND = d_Ibep_dTemp_dt_GND;
staticContributions[admsNodeID_bx] += contribTemp;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_bx][admsProbeID_V_si_bp] += d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_ei] += d_contribTemp_dV_bx_ei;
d_staticContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
staticContributions[admsNodeID_bp] -= contribTemp;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_bp][admsProbeID_V_si_bp] -= d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_ei] -= d_contribTemp_dV_bx_ei;
d_staticContributions[admsNodeID_bp][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_static[admsNodeID_bx] += d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_bp] -= d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(c,cx) <+ (Ircx)
{
double contribTemp;
double d_contribTemp_dTemp_dt_GND;
double d_contribTemp_dV_c_cx;
contribTemp= Ircx;
d_contribTemp_dTemp_dt_GND = d_Ircx_dTemp_dt_GND;
d_contribTemp_dV_c_cx = d_Ircx_dV_c_cx;
staticContributions[admsNodeID_c] += contribTemp;
d_staticContributions[admsNodeID_c][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_c][admsProbeID_V_c_cx] += d_contribTemp_dV_c_cx;
staticContributions[admsNodeID_cx] -= contribTemp;
d_staticContributions[admsNodeID_cx][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_cx][admsProbeID_V_c_cx] -= d_contribTemp_dV_c_cx;

Jdxp_static[admsNodeID_c] += d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_cx] -= d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(cx,ci) <+ (Irci)
{
double contribTemp;
double d_contribTemp_dV_bi_cx;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dV_si_bp;
double d_contribTemp_dV_bx_ei;
double d_contribTemp_dTemp_dt_GND;
double d_contribTemp_dV_cx_ci;
contribTemp= Irci;
d_contribTemp_dV_bi_cx = d_Irci_dV_bi_cx;
d_contribTemp_dV_bi_ei = d_Irci_dV_bi_ei;
d_contribTemp_dV_bi_ci = d_Irci_dV_bi_ci;
d_contribTemp_dV_bx_bp = d_Irci_dV_bx_bp;
d_contribTemp_dV_si_bp = d_Irci_dV_si_bp;
d_contribTemp_dV_bx_ei = d_Irci_dV_bx_ei;
d_contribTemp_dTemp_dt_GND = d_Irci_dTemp_dt_GND;
d_contribTemp_dV_cx_ci = d_Irci_dV_cx_ci;
staticContributions[admsNodeID_cx] += contribTemp;
d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_cx] += d_contribTemp_dV_bi_cx;
d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_cx][admsProbeID_V_si_bp] += d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_ei] += d_contribTemp_dV_bx_ei;
d_staticContributions[admsNodeID_cx][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_cx][admsProbeID_V_cx_ci] += d_contribTemp_dV_cx_ci;
staticContributions[admsNodeID_ci] -= contribTemp;
d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_cx] -= d_contribTemp_dV_bi_cx;
d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_ci][admsProbeID_V_si_bp] -= d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_ei] -= d_contribTemp_dV_bx_ei;
d_staticContributions[admsNodeID_ci][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_ci][admsProbeID_V_cx_ci] -= d_contribTemp_dV_cx_ci;

Jdxp_static[admsNodeID_cx] += d_contribTemp_dV_bi_cx*probeDiffs[admsProbeID_V_bi_cx]*d_probeVars[admsProbeID_V_bi_cx][admsProbeID_V_bi_cx]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_ci] -= d_contribTemp_dV_bi_cx*probeDiffs[admsProbeID_V_bi_cx]*d_probeVars[admsProbeID_V_bi_cx][admsProbeID_V_bi_cx]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(b,bx) <+ (Irbx)
{
double contribTemp;
double d_contribTemp_dTemp_dt_GND;
double d_contribTemp_dV_b_bx;
contribTemp= Irbx;
d_contribTemp_dTemp_dt_GND = d_Irbx_dTemp_dt_GND;
d_contribTemp_dV_b_bx = d_Irbx_dV_b_bx;
staticContributions[admsNodeID_b] += contribTemp;
d_staticContributions[admsNodeID_b][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_b][admsProbeID_V_b_bx] += d_contribTemp_dV_b_bx;
staticContributions[admsNodeID_bx] -= contribTemp;
d_staticContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_bx][admsProbeID_V_b_bx] -= d_contribTemp_dV_b_bx;

Jdxp_static[admsNodeID_b] += d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_bx] -= d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(bx,bi) <+ (Irbi)
{
double contribTemp;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dTemp_dt_GND;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bx_bi;
contribTemp= Irbi;
d_contribTemp_dV_bi_ci = d_Irbi_dV_bi_ci;
d_contribTemp_dTemp_dt_GND = d_Irbi_dTemp_dt_GND;
d_contribTemp_dV_bi_ei = d_Irbi_dV_bi_ei;
d_contribTemp_dV_bx_bi = d_Irbi_dV_bx_bi;
staticContributions[admsNodeID_bx] += contribTemp;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bi] += d_contribTemp_dV_bx_bi;
staticContributions[admsNodeID_bi] -= contribTemp;
d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bi] -= d_contribTemp_dV_bx_bi;

Jdxp_static[admsNodeID_bx] += d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei];
Jdxp_static[admsNodeID_bi] -= d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei];
}
// I(e,ei) <+ (Ire)
{
double contribTemp;
double d_contribTemp_dTemp_dt_GND;
double d_contribTemp_dV_e_ei;
contribTemp= Ire;
d_contribTemp_dTemp_dt_GND = d_Ire_dTemp_dt_GND;
d_contribTemp_dV_e_ei = d_Ire_dV_e_ei;
staticContributions[admsNodeID_e] += contribTemp;
d_staticContributions[admsNodeID_e][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_e][admsProbeID_V_e_ei] += d_contribTemp_dV_e_ei;
staticContributions[admsNodeID_ei] -= contribTemp;
d_staticContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_ei][admsProbeID_V_e_ei] -= d_contribTemp_dV_e_ei;

Jdxp_static[admsNodeID_e] += d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_ei] -= d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(bp,cx) <+ (Irbp)
{
double contribTemp;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dTemp_dt_GND;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dV_bp_cx;
contribTemp= Irbp;
d_contribTemp_dV_bi_ci = d_Irbp_dV_bi_ci;
d_contribTemp_dTemp_dt_GND = d_Irbp_dTemp_dt_GND;
d_contribTemp_dV_bi_ei = d_Irbp_dV_bi_ei;
d_contribTemp_dV_bx_bp = d_Irbp_dV_bx_bp;
d_contribTemp_dV_bp_cx = d_Irbp_dV_bp_cx;
staticContributions[admsNodeID_bp] += contribTemp;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_bp][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bp_cx] += d_contribTemp_dV_bp_cx;
staticContributions[admsNodeID_cx] -= contribTemp;
d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_cx][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_cx][admsProbeID_V_bp_cx] -= d_contribTemp_dV_bp_cx;

Jdxp_static[admsNodeID_bp] += d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp];
Jdxp_static[admsNodeID_cx] -= d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp];
}
// I(si,bp) <+ (Ibcp)
{
double contribTemp;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dV_si_bp;
double d_contribTemp_dV_bx_ei;
double d_contribTemp_dTemp_dt_GND;
contribTemp= Ibcp;
d_contribTemp_dV_bi_ei = d_Ibcp_dV_bi_ei;
d_contribTemp_dV_bi_ci = d_Ibcp_dV_bi_ci;
d_contribTemp_dV_bx_bp = d_Ibcp_dV_bx_bp;
d_contribTemp_dV_si_bp = d_Ibcp_dV_si_bp;
d_contribTemp_dV_bx_ei = d_Ibcp_dV_bx_ei;
d_contribTemp_dTemp_dt_GND = d_Ibcp_dTemp_dt_GND;
staticContributions[admsNodeID_si] += contribTemp;
d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_si][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_si][admsProbeID_V_si_bp] += d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_si][admsProbeID_V_bx_ei] += d_contribTemp_dV_bx_ei;
d_staticContributions[admsNodeID_si][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
staticContributions[admsNodeID_bp] -= contribTemp;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_bp][admsProbeID_V_si_bp] -= d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_ei] -= d_contribTemp_dV_bx_ei;
d_staticContributions[admsNodeID_bp][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_static[admsNodeID_si] += d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_bp] -= d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(bx,si) <+ (Iccp)
{
double contribTemp;
double d_contribTemp_dV_si_bp;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dTemp_dt_GND;
contribTemp= Iccp;
d_contribTemp_dV_si_bp = d_Iccp_dV_si_bp;
d_contribTemp_dV_bi_ei = d_Iccp_dV_bi_ei;
d_contribTemp_dV_bi_ci = d_Iccp_dV_bi_ci;
d_contribTemp_dV_bx_bp = d_Iccp_dV_bx_bp;
d_contribTemp_dTemp_dt_GND = d_Iccp_dTemp_dt_GND;
staticContributions[admsNodeID_bx] += contribTemp;
d_staticContributions[admsNodeID_bx][admsProbeID_V_si_bp] += d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
staticContributions[admsNodeID_si] -= contribTemp;
d_staticContributions[admsNodeID_si][admsProbeID_V_si_bp] -= d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_si][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_si][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_static[admsNodeID_bx] += d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_si] -= d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(s,si) <+ (Irs)
{
double contribTemp;
double d_contribTemp_dTemp_dt_GND;
double d_contribTemp_dV_s_si;
contribTemp= Irs;
d_contribTemp_dTemp_dt_GND = d_Irs_dTemp_dt_GND;
d_contribTemp_dV_s_si = d_Irs_dV_s_si;
staticContributions[admsNodeID_s] += contribTemp;
d_staticContributions[admsNodeID_s][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_s][admsProbeID_V_s_si] += d_contribTemp_dV_s_si;
staticContributions[admsNodeID_si] -= contribTemp;
d_staticContributions[admsNodeID_si][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_si][admsProbeID_V_s_si] -= d_contribTemp_dV_s_si;

Jdxp_static[admsNodeID_s] += d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_static[admsNodeID_si] -= d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(xf1,GND) <+ (Ixf1)
{
double contribTemp;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dTemp_dt_GND;
double d_contribTemp_dV_xf2_GND;
contribTemp= Ixf1;
d_contribTemp_dV_bi_ci = d_Ixf1_dV_bi_ci;
d_contribTemp_dV_bi_ei = d_Ixf1_dV_bi_ei;
d_contribTemp_dTemp_dt_GND = d_Ixf1_dTemp_dt_GND;
d_contribTemp_dV_xf2_GND = d_Ixf1_dV_xf2_GND;
staticContributions[admsNodeID_xf1] += contribTemp;
d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_xf1][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_xf1][admsProbeID_V_xf2_GND] += d_contribTemp_dV_xf2_GND;

Jdxp_static[admsNodeID_xf1] += d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(xf2,GND) <+ (Ixf2)
staticContributions[admsNodeID_xf2] += Ixf2;
d_staticContributions[admsNodeID_xf2][admsProbeID_V_xf1_GND] += d_Ixf2_dV_xf1_GND;
d_staticContributions[admsNodeID_xf2][admsProbeID_V_xf2_GND] += d_Ixf2_dV_xf2_GND;
// Pwr(dt,GND) <+ (Irth)
{
double contribTemp;
double d_contribTemp_dTemp_dt_GND;
contribTemp= Irth;
d_contribTemp_dTemp_dt_GND = d_Irth_dTemp_dt_GND;
staticContributions[admsNodeID_dt] += contribTemp;
d_staticContributions[admsNodeID_dt][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;

Jdxp_static[admsNodeID_dt] += d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// Pwr(dt,GND) <+ (Ith)
{
double contribTemp;
double d_contribTemp_dV_bp_cx;
double d_contribTemp_dV_e_ei;
double d_contribTemp_dV_bx_bi;
double d_contribTemp_dV_b_bx;
double d_contribTemp_dV_bi_cx;
double d_contribTemp_dV_cx_ci;
double d_contribTemp_dV_c_cx;
double d_contribTemp_dV_bx_si;
double d_contribTemp_dV_s_si;
double d_contribTemp_dV_ci_ei;
double d_contribTemp_dV_xf2_GND;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dV_si_bp;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dTemp_dt_GND;
double d_contribTemp_dV_bx_ei;
contribTemp= Ith;
d_contribTemp_dV_bp_cx = d_Ith_dV_bp_cx;
d_contribTemp_dV_e_ei = d_Ith_dV_e_ei;
d_contribTemp_dV_bx_bi = d_Ith_dV_bx_bi;
d_contribTemp_dV_b_bx = d_Ith_dV_b_bx;
d_contribTemp_dV_bi_cx = d_Ith_dV_bi_cx;
d_contribTemp_dV_cx_ci = d_Ith_dV_cx_ci;
d_contribTemp_dV_c_cx = d_Ith_dV_c_cx;
d_contribTemp_dV_bx_si = d_Ith_dV_bx_si;
d_contribTemp_dV_s_si = d_Ith_dV_s_si;
d_contribTemp_dV_ci_ei = d_Ith_dV_ci_ei;
d_contribTemp_dV_xf2_GND = d_Ith_dV_xf2_GND;
d_contribTemp_dV_bx_bp = d_Ith_dV_bx_bp;
d_contribTemp_dV_si_bp = d_Ith_dV_si_bp;
d_contribTemp_dV_bi_ci = d_Ith_dV_bi_ci;
d_contribTemp_dV_bi_ei = d_Ith_dV_bi_ei;
d_contribTemp_dTemp_dt_GND = d_Ith_dTemp_dt_GND;
d_contribTemp_dV_bx_ei = d_Ith_dV_bx_ei;
staticContributions[admsNodeID_dt] += contribTemp;
d_staticContributions[admsNodeID_dt][admsProbeID_V_bp_cx] += d_contribTemp_dV_bp_cx;
d_staticContributions[admsNodeID_dt][admsProbeID_V_e_ei] += d_contribTemp_dV_e_ei;
d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bi] += d_contribTemp_dV_bx_bi;
d_staticContributions[admsNodeID_dt][admsProbeID_V_b_bx] += d_contribTemp_dV_b_bx;
d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_cx] += d_contribTemp_dV_bi_cx;
d_staticContributions[admsNodeID_dt][admsProbeID_V_cx_ci] += d_contribTemp_dV_cx_ci;
d_staticContributions[admsNodeID_dt][admsProbeID_V_c_cx] += d_contribTemp_dV_c_cx;
d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_si] += d_contribTemp_dV_bx_si;
d_staticContributions[admsNodeID_dt][admsProbeID_V_s_si] += d_contribTemp_dV_s_si;
d_staticContributions[admsNodeID_dt][admsProbeID_V_ci_ei] += d_contribTemp_dV_ci_ei;
d_staticContributions[admsNodeID_dt][admsProbeID_V_xf2_GND] += d_contribTemp_dV_xf2_GND;
d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_staticContributions[admsNodeID_dt][admsProbeID_V_si_bp] += d_contribTemp_dV_si_bp;
d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_staticContributions[admsNodeID_dt][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_ei] += d_contribTemp_dV_bx_ei;

Jdxp_static[admsNodeID_dt] += d_contribTemp_dV_bi_cx*probeDiffs[admsProbeID_V_bi_cx]*d_probeVars[admsProbeID_V_bi_cx][admsProbeID_V_bi_cx]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei];
}
}
// End block loadStatic
//Begin block loadDynamic
{
// I(bi,ei) <+ (ddt(Qbe))
{
double contribTemp;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dV_si_bp;
double d_contribTemp_dV_bx_ei;
double d_contribTemp_dV_bi_cx;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dTemp_dt_GND;
contribTemp= (Qbe);
d_contribTemp_dV_bx_bp = (d_Qbe_dV_bx_bp);
d_contribTemp_dV_si_bp = (d_Qbe_dV_si_bp);
d_contribTemp_dV_bx_ei = (d_Qbe_dV_bx_ei);
d_contribTemp_dV_bi_cx = (d_Qbe_dV_bi_cx);
d_contribTemp_dV_bi_ci = (d_Qbe_dV_bi_ci);
d_contribTemp_dV_bi_ei = (d_Qbe_dV_bi_ei);
d_contribTemp_dTemp_dt_GND = (d_Qbe_dTemp_dt_GND);
dynamicContributions[admsNodeID_bi] += contribTemp;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_si_bp] += d_contribTemp_dV_si_bp;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_ei] += d_contribTemp_dV_bx_ei;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_cx] += d_contribTemp_dV_bi_cx;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_dynamicContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
dynamicContributions[admsNodeID_ei] -= contribTemp;
d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_dynamicContributions[admsNodeID_ei][admsProbeID_V_si_bp] -= d_contribTemp_dV_si_bp;
d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_ei] -= d_contribTemp_dV_bx_ei;
d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_cx] -= d_contribTemp_dV_bi_cx;
d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_dynamicContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_dynamic[admsNodeID_bi] += d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dV_bi_cx*probeDiffs[admsProbeID_V_bi_cx]*d_probeVars[admsProbeID_V_bi_cx][admsProbeID_V_bi_cx]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_dynamic[admsNodeID_ei] -= d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dV_bi_cx*probeDiffs[admsProbeID_V_bi_cx]*d_probeVars[admsProbeID_V_bi_cx][admsProbeID_V_bi_cx]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(bx,ei) <+ (ddt(Qbex))
{
double contribTemp;
double d_contribTemp_dV_bx_ei;
double d_contribTemp_dTemp_dt_GND;
contribTemp= (Qbex);
d_contribTemp_dV_bx_ei = (d_Qbex_dV_bx_ei);
d_contribTemp_dTemp_dt_GND = (d_Qbex_dTemp_dt_GND);
dynamicContributions[admsNodeID_bx] += contribTemp;
d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_ei] += d_contribTemp_dV_bx_ei;
d_dynamicContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
dynamicContributions[admsNodeID_ei] -= contribTemp;
d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_ei] -= d_contribTemp_dV_bx_ei;
d_dynamicContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_dynamic[admsNodeID_bx] += d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_dynamic[admsNodeID_ei] -= d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(bi,ci) <+ (ddt(Qbc))
{
double contribTemp;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dV_si_bp;
double d_contribTemp_dV_bx_ei;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dTemp_dt_GND;
contribTemp= (Qbc);
d_contribTemp_dV_bx_bp = (d_Qbc_dV_bx_bp);
d_contribTemp_dV_si_bp = (d_Qbc_dV_si_bp);
d_contribTemp_dV_bx_ei = (d_Qbc_dV_bx_ei);
d_contribTemp_dV_bi_ei = (d_Qbc_dV_bi_ei);
d_contribTemp_dV_bi_ci = (d_Qbc_dV_bi_ci);
d_contribTemp_dTemp_dt_GND = (d_Qbc_dTemp_dt_GND);
dynamicContributions[admsNodeID_bi] += contribTemp;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_si_bp] += d_contribTemp_dV_si_bp;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_ei] += d_contribTemp_dV_bx_ei;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_dynamicContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
dynamicContributions[admsNodeID_ci] -= contribTemp;
d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_dynamicContributions[admsNodeID_ci][admsProbeID_V_si_bp] -= d_contribTemp_dV_si_bp;
d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_ei] -= d_contribTemp_dV_bx_ei;
d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_dynamicContributions[admsNodeID_ci][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_dynamic[admsNodeID_bi] += d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_dynamic[admsNodeID_ci] -= d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bx_ei*probeDiffs[admsProbeID_V_bx_ei]*d_probeVars[admsProbeID_V_bx_ei][admsProbeID_V_bx_ei]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(bi,cx) <+ (ddt(Qbcx))
{
double contribTemp;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dV_bi_cx;
double d_contribTemp_dTemp_dt_GND;
contribTemp= (Qbcx);
d_contribTemp_dV_bi_ci = (d_Qbcx_dV_bi_ci);
d_contribTemp_dV_bi_ei = (d_Qbcx_dV_bi_ei);
d_contribTemp_dV_bx_bp = (d_Qbcx_dV_bx_bp);
d_contribTemp_dV_bi_cx = (d_Qbcx_dV_bi_cx);
d_contribTemp_dTemp_dt_GND = (d_Qbcx_dTemp_dt_GND);
dynamicContributions[admsNodeID_bi] += contribTemp;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_cx] += d_contribTemp_dV_bi_cx;
d_dynamicContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
dynamicContributions[admsNodeID_cx] -= contribTemp;
d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_cx] -= d_contribTemp_dV_bi_cx;
d_dynamicContributions[admsNodeID_cx][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_dynamic[admsNodeID_bi] += d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bi_cx*probeDiffs[admsProbeID_V_bi_cx]*d_probeVars[admsProbeID_V_bi_cx][admsProbeID_V_bi_cx]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_dynamic[admsNodeID_cx] -= d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dV_bi_cx*probeDiffs[admsProbeID_V_bi_cx]*d_probeVars[admsProbeID_V_bi_cx][admsProbeID_V_bi_cx]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(bx,bp) <+ (ddt(Qbep))
{
double contribTemp;
double d_contribTemp_dV_bi_ei;
double d_contribTemp_dV_bi_ci;
double d_contribTemp_dV_bx_bp;
double d_contribTemp_dTemp_dt_GND;
contribTemp= (Qbep);
d_contribTemp_dV_bi_ei = (d_Qbep_dV_bi_ei);
d_contribTemp_dV_bi_ci = (d_Qbep_dV_bi_ci);
d_contribTemp_dV_bx_bp = (d_Qbep_dV_bx_bp);
d_contribTemp_dTemp_dt_GND = (d_Qbep_dTemp_dt_GND);
dynamicContributions[admsNodeID_bx] += contribTemp;
d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ei] += d_contribTemp_dV_bi_ei;
d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ci] += d_contribTemp_dV_bi_ci;
d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_bp] += d_contribTemp_dV_bx_bp;
d_dynamicContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
dynamicContributions[admsNodeID_bp] -= contribTemp;
d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ei] -= d_contribTemp_dV_bi_ei;
d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ci] -= d_contribTemp_dV_bi_ci;
d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bx_bp] -= d_contribTemp_dV_bx_bp;
d_dynamicContributions[admsNodeID_bp][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_dynamic[admsNodeID_bx] += d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_dynamic[admsNodeID_bp] -= d_contribTemp_dV_bi_ei*probeDiffs[admsProbeID_V_bi_ei]*d_probeVars[admsProbeID_V_bi_ei][admsProbeID_V_bi_ei]+d_contribTemp_dV_bi_ci*probeDiffs[admsProbeID_V_bi_ci]*d_probeVars[admsProbeID_V_bi_ci][admsProbeID_V_bi_ci]+d_contribTemp_dV_bx_bp*probeDiffs[admsProbeID_V_bx_bp]*d_probeVars[admsProbeID_V_bx_bp][admsProbeID_V_bx_bp]+d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(b,e) <+ (ddt(Qbeo))
{
double contribTemp;
double d_contribTemp_dV_b_e;
contribTemp= (Qbeo);
d_contribTemp_dV_b_e = (d_Qbeo_dV_b_e);
dynamicContributions[admsNodeID_b] += contribTemp;
d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_e] += d_contribTemp_dV_b_e;
dynamicContributions[admsNodeID_e] -= contribTemp;
d_dynamicContributions[admsNodeID_e][admsProbeID_V_b_e] -= d_contribTemp_dV_b_e;

Jdxp_dynamic[admsNodeID_b] += d_contribTemp_dV_b_e*probeDiffs[admsProbeID_V_b_e]*d_probeVars[admsProbeID_V_b_e][admsProbeID_V_b_e];
Jdxp_dynamic[admsNodeID_e] -= d_contribTemp_dV_b_e*probeDiffs[admsProbeID_V_b_e]*d_probeVars[admsProbeID_V_b_e][admsProbeID_V_b_e];
}
// I(b,c) <+ (ddt(Qbco))
dynamicContributions[admsNodeID_b] += (Qbco);
d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_c] += (d_Qbco_dV_b_c);
dynamicContributions[admsNodeID_c] -= (Qbco);
d_dynamicContributions[admsNodeID_c][admsProbeID_V_b_c] -= (d_Qbco_dV_b_c);
// I(si,bp) <+ (ddt(Qbcp))
{
double contribTemp;
double d_contribTemp_dV_si_bp;
double d_contribTemp_dTemp_dt_GND;
contribTemp= (Qbcp);
d_contribTemp_dV_si_bp = (d_Qbcp_dV_si_bp);
d_contribTemp_dTemp_dt_GND = (d_Qbcp_dTemp_dt_GND);
dynamicContributions[admsNodeID_si] += contribTemp;
d_dynamicContributions[admsNodeID_si][admsProbeID_V_si_bp] += d_contribTemp_dV_si_bp;
d_dynamicContributions[admsNodeID_si][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;
dynamicContributions[admsNodeID_bp] -= contribTemp;
d_dynamicContributions[admsNodeID_bp][admsProbeID_V_si_bp] -= d_contribTemp_dV_si_bp;
d_dynamicContributions[admsNodeID_bp][admsProbeID_Temp_dt_GND] -= d_contribTemp_dTemp_dt_GND;

Jdxp_dynamic[admsNodeID_si] += d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
Jdxp_dynamic[admsNodeID_bp] -= d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
// I(xf1,GND) <+ (ddt(Qxf1))
dynamicContributions[admsNodeID_xf1] += (Qxf1);
d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_xf1_GND] += (d_Qxf1_dV_xf1_GND);
// I(xf2,GND) <+ (ddt(Qxf2))
dynamicContributions[admsNodeID_xf2] += (Qxf2);
d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_xf2_GND] += (d_Qxf2_dV_xf2_GND);
// Pwr(dt,GND) <+ (ddt(Qcth))
{
double contribTemp;
double d_contribTemp_dTemp_dt_GND;
contribTemp= (Qcth);
d_contribTemp_dTemp_dt_GND = (d_Qcth_dTemp_dt_GND);
dynamicContributions[admsNodeID_dt] += contribTemp;
d_dynamicContributions[admsNodeID_dt][admsProbeID_Temp_dt_GND] += d_contribTemp_dTemp_dt_GND;

Jdxp_dynamic[admsNodeID_dt] += d_contribTemp_dTemp_dt_GND*probeDiffs[admsProbeID_Temp_dt_GND]*d_probeVars[admsProbeID_Temp_dt_GND][admsProbeID_Temp_dt_GND];
}
}
// End block loadDynamic
//Begin block noise
{
if (sw_noise)
{
// I(bi,ei) <+ (white_noise((((mMod*2)*1.602189e-19)*abs(Ibe)),"Ibei shot noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[0]= (((mMod*2)*1.602189e-19)*fabs(Ibe));
}
// I(bi,ei) <+ (flicker_noise(((mMod*kfn)*pow(abs((Ibe/mMod)),afn)),bfn,"Ibei flicker noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[1]= ((mMod*(model_.kfn))*pow(fabs((Ibe/mMod)),(model_.afn)));
  noiseContribsExponent[1]= (model_.bfn);
}
// I(bx,ei) <+ (white_noise((((mMod*2)*1.602189e-19)*abs(Ibex)),"Ibex shot noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[2]= (((mMod*2)*1.602189e-19)*fabs(Ibex));
}
// I(bx,ei) <+ (flicker_noise(((mMod*kfn)*pow(abs((Ibex/mMod)),afn)),bfn,"Ibex flicker noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[3]= ((mMod*(model_.kfn))*pow(fabs((Ibex/mMod)),(model_.afn)));
  noiseContribsExponent[3]= (model_.bfn);
}
// I(ci,ei) <+ (white_noise((((mMod*2)*1.602189e-19)*abs(Itzf)),"transport current shot noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[4]= (((mMod*2)*1.602189e-19)*fabs(Itzf));
}
// I(bx,bp) <+ (white_noise((((mMod*2)*1.602189e-19)*abs(Ibep)),"Ibep shot noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[5]= (((mMod*2)*1.602189e-19)*fabs(Ibep));
}
// I(bx,bp) <+ (flicker_noise((((mMod*mMod)*kfn)*pow(abs((Ibep/mMod)),afn)),bfn,"Ibep flicker noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[6]= (((mMod*mMod)*(model_.kfn))*pow(fabs((Ibep/mMod)),(model_.afn)));
  noiseContribsExponent[6]= (model_.bfn);
}
// I(c,cx) <+ (white_noise(((((mMod*4)*1.380662e-23)*tdevK)*Gcx),"rcx thermal noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[7]= ((((mMod*4)*1.380662e-23)*tdevK)*Gcx);
}
// I(cx,ci) <+ (white_noise(((((mMod*4)*1.380662e-23)*tdevK)*((abs(Irci)+(1.0e-10*Gci))/(abs(Vrci)+1.0e-10))),"rci thermal noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[8]= ((((mMod*4)*1.380662e-23)*tdevK)*((fabs(Irci)+(1.0e-10*Gci))/(fabs(Vrci)+1.0e-10)));
}
// I(b,bx) <+ (white_noise(((((mMod*4)*1.380662e-23)*tdevK)*Gbx),"rbx thermal noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[9]= ((((mMod*4)*1.380662e-23)*tdevK)*Gbx);
}
// I(bx,bi) <+ (white_noise((((((mMod*4)*1.380662e-23)*tdevK)*qb)*Gbi),"rbi thermal noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[10]= (((((mMod*4)*1.380662e-23)*tdevK)*qb)*Gbi);
}
// I(e,ei) <+ (white_noise(((((mMod*4)*1.380662e-23)*tdevK)*Ge),"re thermal noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[11]= ((((mMod*4)*1.380662e-23)*tdevK)*Ge);
}
// I(bp,cx) <+ (white_noise((((((mMod*4)*1.380662e-23)*tdevK)*qbp)*Gbp),"rbp thermal noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[12]= (((((mMod*4)*1.380662e-23)*tdevK)*qbp)*Gbp);
}
// I(bx,si) <+ (white_noise((((mMod*2)*1.602189e-19)*abs(Iccp)),"parasitic transport current shot noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[13]= (((mMod*2)*1.602189e-19)*fabs(Iccp));
}
// I(s,si) <+ (white_noise(((((mMod*4)*1.380662e-23)*tdevK)*Gs),"rs thermal noise"))
if (getSolverState().noiseFlag)
{
  noiseContribsPower[14]= ((((mMod*4)*1.380662e-23)*tdevK)*Gs);
}
}
}
// End block noise


  // -- endcode converted from analog/code block
  if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
  {
    Xyce::dout() << " probeVars[admsProbeID_V_xf2_GND] =  "
         <<probeVars[admsProbeID_V_xf2_GND] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_xf1_GND] =  "
         <<probeVars[admsProbeID_V_xf1_GND] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_s_si] =  "
         <<probeVars[admsProbeID_V_s_si] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_bx_si] =  "
         <<probeVars[admsProbeID_V_bx_si] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_si_bp] =  "
         <<probeVars[admsProbeID_V_si_bp] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_bp_cx] =  "
         <<probeVars[admsProbeID_V_bp_cx] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_e_ei] =  "
         <<probeVars[admsProbeID_V_e_ei] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_bx_bi] =  "
         <<probeVars[admsProbeID_V_bx_bi] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_b_bx] =  "
         <<probeVars[admsProbeID_V_b_bx] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_cx_ci] =  "
         <<probeVars[admsProbeID_V_cx_ci] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_c_cx] =  "
         <<probeVars[admsProbeID_V_c_cx] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_b_c] =  "
         <<probeVars[admsProbeID_V_b_c] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_b_e] =  "
         <<probeVars[admsProbeID_V_b_e] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_bx_bp] =  "
         <<probeVars[admsProbeID_V_bx_bp] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_ci_ei] =  "
         <<probeVars[admsProbeID_V_ci_ei] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_bx_cx] =  "
         <<probeVars[admsProbeID_V_bx_cx] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_bi_cx] =  "
         <<probeVars[admsProbeID_V_bi_cx] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_bi_ci] =  "
         <<probeVars[admsProbeID_V_bi_ci] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_bx_ei] =  "
         <<probeVars[admsProbeID_V_bx_ei] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_V_bi_ei] =  "
         <<probeVars[admsProbeID_V_bi_ei] << std::endl;
    Xyce::dout() << " probeVars[admsProbeID_Temp_dt_GND] =  "
         <<probeVars[admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_c] =  "
         <<staticContributions[admsNodeID_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_c].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_c][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_c] =  "
         <<dynamicContributions[admsNodeID_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_c].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_c][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_c] =  "
         <<Jdxp_static[admsNodeID_c] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_c] =  "
         <<Jdxp_dynamic[admsNodeID_c] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_b] =  "
         <<staticContributions[admsNodeID_b] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_b].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_b][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_b] =  "
         <<dynamicContributions[admsNodeID_b] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_b].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_b][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_b] =  "
         <<Jdxp_static[admsNodeID_b] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_b] =  "
         <<Jdxp_dynamic[admsNodeID_b] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_e] =  "
         <<staticContributions[admsNodeID_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_e].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_e][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_e] =  "
         <<dynamicContributions[admsNodeID_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_e].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_e][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_e] =  "
         <<Jdxp_static[admsNodeID_e] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_e] =  "
         <<Jdxp_dynamic[admsNodeID_e] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_s] =  "
         <<staticContributions[admsNodeID_s] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_s].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_s][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_s] =  "
         <<dynamicContributions[admsNodeID_s] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_s].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_s][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_s] =  "
         <<Jdxp_static[admsNodeID_s] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_s] =  "
         <<Jdxp_dynamic[admsNodeID_s] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_dt] =  "
         <<staticContributions[admsNodeID_dt] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_dt].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_dt][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_dt] =  "
         <<dynamicContributions[admsNodeID_dt] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_dt].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_dt][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_dt] =  "
         <<Jdxp_static[admsNodeID_dt] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_dt] =  "
         <<Jdxp_dynamic[admsNodeID_dt] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_cx] =  "
         <<staticContributions[admsNodeID_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_cx].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_cx][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_cx] =  "
         <<dynamicContributions[admsNodeID_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_cx].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_cx][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_cx] =  "
         <<Jdxp_static[admsNodeID_cx] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_cx] =  "
         <<Jdxp_dynamic[admsNodeID_cx] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_ci] =  "
         <<staticContributions[admsNodeID_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ci].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_ci][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_ci] =  "
         <<dynamicContributions[admsNodeID_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ci].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_ci][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_ci] =  "
         <<Jdxp_static[admsNodeID_ci] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_ci] =  "
         <<Jdxp_dynamic[admsNodeID_ci] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_bx] =  "
         <<staticContributions[admsNodeID_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bx].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_bx] =  "
         <<dynamicContributions[admsNodeID_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bx].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_bx] =  "
         <<Jdxp_static[admsNodeID_bx] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_bx] =  "
         <<Jdxp_dynamic[admsNodeID_bx] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_bi] =  "
         <<staticContributions[admsNodeID_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bi].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_bi] =  "
         <<dynamicContributions[admsNodeID_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bi].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_bi] =  "
         <<Jdxp_static[admsNodeID_bi] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_bi] =  "
         <<Jdxp_dynamic[admsNodeID_bi] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_ei] =  "
         <<staticContributions[admsNodeID_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_ei].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_ei] =  "
         <<dynamicContributions[admsNodeID_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_ei].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_ei] =  "
         <<Jdxp_static[admsNodeID_ei] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_ei] =  "
         <<Jdxp_dynamic[admsNodeID_ei] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_bp] =  "
         <<staticContributions[admsNodeID_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_bp].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_bp][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_bp] =  "
         <<dynamicContributions[admsNodeID_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_bp].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_bp][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_bp] =  "
         <<Jdxp_static[admsNodeID_bp] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_bp] =  "
         <<Jdxp_dynamic[admsNodeID_bp] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_si] =  "
         <<staticContributions[admsNodeID_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_si].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_si][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_si] =  "
         <<dynamicContributions[admsNodeID_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_si].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_si][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_si] =  "
         <<Jdxp_static[admsNodeID_si] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_si] =  "
         <<Jdxp_dynamic[admsNodeID_si] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_xf1] =  "
         <<staticContributions[admsNodeID_xf1] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf1].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_xf1][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_xf1] =  "
         <<dynamicContributions[admsNodeID_xf1] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf1].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_xf1][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_xf1] =  "
         <<Jdxp_static[admsNodeID_xf1] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_xf1] =  "
         <<Jdxp_dynamic[admsNodeID_xf1] << std::endl;
    Xyce::dout() << " staticContributions[admsNodeID_xf2] =  "
         <<staticContributions[admsNodeID_xf2] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_xf2_GND) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_xf1_GND) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_s_si) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_bx_si) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_si_bp) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_bp_cx) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_e_ei) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_bx_bi) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_b_bx) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_cx_ci) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_c_cx) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_b_c) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_b_e) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_bx_bp) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_ci_ei) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_bx_cx) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_bi_cx) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_bi_ci) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_bx_ei) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_V_bi_ei) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    staticContributions[admsNodeID_xf2].dx(admsProbeID_Temp_dt_GND) =  " <<d_staticContributions[admsNodeID_xf2][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " dynamicContributions[admsNodeID_xf2] =  "
         <<dynamicContributions[admsNodeID_xf2] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_xf2_GND) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_xf2_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_xf1_GND) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_xf1_GND] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_s_si) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_s_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_bx_si) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_bx_si] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_si_bp) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_si_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_bp_cx) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_bp_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_e_ei) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_e_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_bx_bi) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_bx_bi] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_b_bx) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_b_bx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_cx_ci) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_cx_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_c_cx) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_c_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_b_c) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_b_c] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_b_e) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_b_e] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_bx_bp) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_bx_bp] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_ci_ei) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_ci_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_bx_cx) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_bx_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_bi_cx) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_bi_cx] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_bi_ci) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_bi_ci] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_bx_ei) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_bx_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_V_bi_ei) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_bi_ei] << std::endl;
      Xyce::dout() << "    dynamicContributions[admsNodeID_xf2].dx(admsProbeID_Temp_dt_GND) =  " <<d_dynamicContributions[admsNodeID_xf2][admsProbeID_Temp_dt_GND] << std::endl;
    Xyce::dout() << " Jdxp_static[admsNodeID_xf2] =  "
         <<Jdxp_static[admsNodeID_xf2] << std::endl;
    Xyce::dout() << " Jdxp_dynamic[admsNodeID_xf2] =  "
         <<Jdxp_dynamic[admsNodeID_xf2] << std::endl;

    if (!origFlag)
      Xyce::dout() << "This step was limited by this device." << std::endl;
  }


  if (loadLeadCurrent)
  {
    // If needed, we must now copy all the data from staticContributions
    // and dynamicContributionsinto the lead current F vector
    // Must make sure all collapsed node contributions get summed into the
    // external nodes properly.
    for ( int unmappedNode=0; unmappedNode < 4 ; unmappedNode++)
    {
      leadCurrentF[unmappedNode] = 0.0;
      leadCurrentQ[unmappedNode] = 0.0;
    }
    for ( int unmappedNode=0; unmappedNode < 14; unmappedNode++)
    {
      if (nodeMap[unmappedNode] < 4 && nodeMap[unmappedNode] != -1 )
      {
        leadCurrentF[nodeMap[unmappedNode]] += staticContributions[unmappedNode];
        leadCurrentQ[nodeMap[unmappedNode]] += dynamicContributions[unmappedNode];
      }
    }
  }
  return true;
}

//-----------------------------------------------------------------------------
// Function      : Instance::getNumNoiseSources
// Purpose       :
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
int Instance::getNumNoiseSources () const
{
return 15;
}

//-----------------------------------------------------------------------------
// Function      : Instance::setupNoiseSources
// Purpose       :
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
void Instance::setupNoiseSources (Xyce::Analysis::NoiseData & noiseData)
{
int numSources=getNumNoiseSources();
noiseData.numSources = numSources;
noiseData.resize(numSources);

noiseData.deviceName = getName().getEncodedName();
std::string theNoiseName;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_bi_ei")+std::string("_")+std::string("Ibei shot noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[0]=theNoiseName;
noiseData.li_Pos[0]=li_bi;
noiseData.li_Neg[0]=li_ei;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_flicker_bi_ei")+std::string("_")+std::string("Ibei flicker noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[1]=theNoiseName;
noiseData.li_Pos[1]=li_bi;
noiseData.li_Neg[1]=li_ei;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_bx_ei")+std::string("_")+std::string("Ibex shot noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[2]=theNoiseName;
noiseData.li_Pos[2]=li_bx;
noiseData.li_Neg[2]=li_ei;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_flicker_bx_ei")+std::string("_")+std::string("Ibex flicker noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[3]=theNoiseName;
noiseData.li_Pos[3]=li_bx;
noiseData.li_Neg[3]=li_ei;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_ci_ei")+std::string("_")+std::string("transport current shot noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[4]=theNoiseName;
noiseData.li_Pos[4]=li_ci;
noiseData.li_Neg[4]=li_ei;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_bx_bp")+std::string("_")+std::string("Ibep shot noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[5]=theNoiseName;
noiseData.li_Pos[5]=li_bx;
noiseData.li_Neg[5]=li_bp;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_flicker_bx_bp")+std::string("_")+std::string("Ibep flicker noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[6]=theNoiseName;
noiseData.li_Pos[6]=li_bx;
noiseData.li_Neg[6]=li_bp;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_c_cx")+std::string("_")+std::string("rcx thermal noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[7]=theNoiseName;
noiseData.li_Pos[7]=li_c;
noiseData.li_Neg[7]=li_cx;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_cx_ci")+std::string("_")+std::string("rci thermal noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[8]=theNoiseName;
noiseData.li_Pos[8]=li_cx;
noiseData.li_Neg[8]=li_ci;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_b_bx")+std::string("_")+std::string("rbx thermal noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[9]=theNoiseName;
noiseData.li_Pos[9]=li_b;
noiseData.li_Neg[9]=li_bx;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_bx_bi")+std::string("_")+std::string("rbi thermal noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[10]=theNoiseName;
noiseData.li_Pos[10]=li_bx;
noiseData.li_Neg[10]=li_bi;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_e_ei")+std::string("_")+std::string("re thermal noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[11]=theNoiseName;
noiseData.li_Pos[11]=li_e;
noiseData.li_Neg[11]=li_ei;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_bp_cx")+std::string("_")+std::string("rbp thermal noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[12]=theNoiseName;
noiseData.li_Pos[12]=li_bp;
noiseData.li_Neg[12]=li_cx;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_bx_si")+std::string("_")+std::string("parasitic transport current shot noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[13]=theNoiseName;
noiseData.li_Pos[13]=li_bx;
noiseData.li_Neg[13]=li_si;
theNoiseName = std::string("noise_")+getName().getEncodedName()+std::string("_white_s_si")+std::string("_")+std::string("rs thermal noise");
std::replace(theNoiseName.begin(), theNoiseName.end(), ' ', '_');
noiseData.noiseNames[14]=theNoiseName;
noiseData.li_Pos[14]=li_s;
noiseData.li_Neg[14]=li_si;


}
//-----------------------------------------------------------------------------
// Function      : Instance::getNoiseSources
// Purpose       :
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
void Instance::getNoiseSources (Xyce::Analysis::NoiseData & noiseData)
{noiseData.noiseDens[0] = noiseContribsPower[0];
noiseData.lnNoiseDens[0] = std::log(std::max(noiseData.noiseDens[0],N_MINLOG));
noiseData.noiseDens[1] = noiseContribsPower[1];

      noiseData.noiseDens[1] /= pow(noiseData.freq,noiseContribsExponent[1]);noiseData.lnNoiseDens[1] = std::log(std::max(noiseData.noiseDens[1],N_MINLOG));
noiseData.noiseDens[2] = noiseContribsPower[2];
noiseData.lnNoiseDens[2] = std::log(std::max(noiseData.noiseDens[2],N_MINLOG));
noiseData.noiseDens[3] = noiseContribsPower[3];

      noiseData.noiseDens[3] /= pow(noiseData.freq,noiseContribsExponent[3]);noiseData.lnNoiseDens[3] = std::log(std::max(noiseData.noiseDens[3],N_MINLOG));
noiseData.noiseDens[4] = noiseContribsPower[4];
noiseData.lnNoiseDens[4] = std::log(std::max(noiseData.noiseDens[4],N_MINLOG));
noiseData.noiseDens[5] = noiseContribsPower[5];
noiseData.lnNoiseDens[5] = std::log(std::max(noiseData.noiseDens[5],N_MINLOG));
noiseData.noiseDens[6] = noiseContribsPower[6];

      noiseData.noiseDens[6] /= pow(noiseData.freq,noiseContribsExponent[6]);noiseData.lnNoiseDens[6] = std::log(std::max(noiseData.noiseDens[6],N_MINLOG));
noiseData.noiseDens[7] = noiseContribsPower[7];
noiseData.lnNoiseDens[7] = std::log(std::max(noiseData.noiseDens[7],N_MINLOG));
noiseData.noiseDens[8] = noiseContribsPower[8];
noiseData.lnNoiseDens[8] = std::log(std::max(noiseData.noiseDens[8],N_MINLOG));
noiseData.noiseDens[9] = noiseContribsPower[9];
noiseData.lnNoiseDens[9] = std::log(std::max(noiseData.noiseDens[9],N_MINLOG));
noiseData.noiseDens[10] = noiseContribsPower[10];
noiseData.lnNoiseDens[10] = std::log(std::max(noiseData.noiseDens[10],N_MINLOG));
noiseData.noiseDens[11] = noiseContribsPower[11];
noiseData.lnNoiseDens[11] = std::log(std::max(noiseData.noiseDens[11],N_MINLOG));
noiseData.noiseDens[12] = noiseContribsPower[12];
noiseData.lnNoiseDens[12] = std::log(std::max(noiseData.noiseDens[12],N_MINLOG));
noiseData.noiseDens[13] = noiseContribsPower[13];
noiseData.lnNoiseDens[13] = std::log(std::max(noiseData.noiseDens[13],N_MINLOG));
noiseData.noiseDens[14] = noiseContribsPower[14];
noiseData.lnNoiseDens[14] = std::log(std::max(noiseData.noiseDens[14],N_MINLOG));

}

//-----------------------------------------------------------------------------
// Function      : Instance::loadDAEdFdx
// Purpose       :
// Special Notes : Load the dFdx ("static jacobian") matrix
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
bool Instance::loadDAEdFdx()
{
  bool bsuccess = true;
  Linear::Matrix & dFdx = *(extData.dFdxMatrixPtr);

#ifndef Xyce_NONPOINTER_MATRIX_LOAD
  (*f_bi_Equ_bx_Node_Ptr) +=  +d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bi] +d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bp];
  (*f_bi_Equ_bp_Node_Ptr) +=  -d_staticContributions[admsNodeID_bi][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bp];
  (*f_ei_Equ_bx_Node_Ptr) +=  +d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_bp];
  (*f_ei_Equ_bp_Node_Ptr) +=  -d_staticContributions[admsNodeID_ei][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_bp];
  (*f_bi_Equ_si_Node_Ptr) +=  +d_staticContributions[admsNodeID_bi][admsProbeID_V_si_bp];
  (*f_ei_Equ_si_Node_Ptr) +=  +d_staticContributions[admsNodeID_ei][admsProbeID_V_si_bp];
  (*f_bi_Equ_bi_Node_Ptr) +=  -d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bi] +d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ei] +d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ci];
  (*f_bi_Equ_ci_Node_Ptr) +=  -d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ci];
  (*f_ei_Equ_bi_Node_Ptr) +=  +d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ei] +d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ci];
  (*f_ei_Equ_ci_Node_Ptr) +=  -d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ci];
  (*f_bi_Equ_ei_Node_Ptr) +=  -d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ei];
  (*f_ei_Equ_ei_Node_Ptr) +=  -d_staticContributions[admsNodeID_ei][admsProbeID_V_e_ei] -d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ei];
  (*f_bi_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND];
  (*f_ei_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND];
  (*f_bx_Equ_bi_Node_Ptr) +=  -d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bi] +d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ei];
  (*f_bx_Equ_ei_Node_Ptr) +=  -d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ei];
  (*f_bx_Equ_ci_Node_Ptr) +=  -d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ci];
  (*f_bx_Equ_bx_Node_Ptr) +=  +d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bi] -d_staticContributions[admsNodeID_bx][admsProbeID_V_b_bx] +d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_cx] +d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bp];
  (*f_bx_Equ_bp_Node_Ptr) +=  -d_staticContributions[admsNodeID_bx][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bp];
  (*f_bx_Equ_si_Node_Ptr) +=  +d_staticContributions[admsNodeID_bx][admsProbeID_V_si_bp];
  (*f_bx_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND];
  (*f_ci_Equ_xf2_Node_Ptr) +=  +d_staticContributions[admsNodeID_ci][admsProbeID_V_xf2_GND];
  (*f_ei_Equ_xf2_Node_Ptr) +=  +d_staticContributions[admsNodeID_ei][admsProbeID_V_xf2_GND];
  (*f_ci_Equ_bi_Node_Ptr) +=  +d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_cx] +d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ei];
  (*f_ci_Equ_ei_Node_Ptr) +=  -d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ei];
  (*f_ci_Equ_ci_Node_Ptr) +=  -d_staticContributions[admsNodeID_ci][admsProbeID_V_cx_ci] -d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ci];
  (*f_ci_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_ci][admsProbeID_Temp_dt_GND];
  (*f_bi_Equ_xf2_Node_Ptr) +=  +d_staticContributions[admsNodeID_bi][admsProbeID_V_xf2_GND];
  (*f_ci_Equ_bx_Node_Ptr) +=  +d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_bp];
  (*f_ci_Equ_bp_Node_Ptr) +=  -d_staticContributions[admsNodeID_ci][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_bp];
  (*f_ci_Equ_si_Node_Ptr) +=  +d_staticContributions[admsNodeID_ci][admsProbeID_V_si_bp];
  (*f_cx_Equ_bi_Node_Ptr) +=  +d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ei] +d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_cx] +d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ci];
  (*f_cx_Equ_ci_Node_Ptr) +=  -d_staticContributions[admsNodeID_cx][admsProbeID_V_cx_ci] -d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ci];
  (*f_bx_Equ_cx_Node_Ptr) +=  -d_staticContributions[admsNodeID_bx][admsProbeID_V_c_cx] -d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_cx];
  (*f_cx_Equ_bx_Node_Ptr) +=  +d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_bp] +d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_cx];
  (*f_cx_Equ_cx_Node_Ptr) +=  -d_staticContributions[admsNodeID_cx][admsProbeID_V_bp_cx] +d_staticContributions[admsNodeID_cx][admsProbeID_V_cx_ci] -d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_cx] -d_staticContributions[admsNodeID_cx][admsProbeID_V_c_cx] -d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_cx];
  (*f_cx_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_cx][admsProbeID_Temp_dt_GND];
  (*f_bx_Equ_c_Node_Ptr) +=  +d_staticContributions[admsNodeID_bx][admsProbeID_V_c_cx];
  (*f_cx_Equ_c_Node_Ptr) +=  +d_staticContributions[admsNodeID_cx][admsProbeID_V_c_cx];
  (*f_bp_Equ_bi_Node_Ptr) +=  +d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ei];
  (*f_bp_Equ_ei_Node_Ptr) +=  -d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ei];
  (*f_bp_Equ_ci_Node_Ptr) +=  -d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ci];
  (*f_bp_Equ_bx_Node_Ptr) +=  +d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_bp];
  (*f_bp_Equ_bp_Node_Ptr) +=  +d_staticContributions[admsNodeID_bp][admsProbeID_V_bp_cx] -d_staticContributions[admsNodeID_bp][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_bp];
  (*f_bp_Equ_si_Node_Ptr) +=  +d_staticContributions[admsNodeID_bp][admsProbeID_V_si_bp];
  (*f_bp_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_bp][admsProbeID_Temp_dt_GND];
  (*f_c_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_c][admsProbeID_Temp_dt_GND];
  (*f_c_Equ_c_Node_Ptr) +=  +d_staticContributions[admsNodeID_c][admsProbeID_V_c_cx];
  (*f_c_Equ_cx_Node_Ptr) +=  -d_staticContributions[admsNodeID_c][admsProbeID_V_c_cx];
  (*f_ci_Equ_cx_Node_Ptr) +=  +d_staticContributions[admsNodeID_ci][admsProbeID_V_cx_ci] -d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_cx];
  (*f_cx_Equ_ei_Node_Ptr) +=  -d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ei];
  (*f_cx_Equ_bp_Node_Ptr) +=  +d_staticContributions[admsNodeID_cx][admsProbeID_V_bp_cx] -d_staticContributions[admsNodeID_cx][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_bp];
  (*f_cx_Equ_si_Node_Ptr) +=  +d_staticContributions[admsNodeID_cx][admsProbeID_V_si_bp];
  (*f_b_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_b][admsProbeID_Temp_dt_GND];
  (*f_b_Equ_b_Node_Ptr) +=  +d_staticContributions[admsNodeID_b][admsProbeID_V_b_bx];
  (*f_b_Equ_bx_Node_Ptr) +=  -d_staticContributions[admsNodeID_b][admsProbeID_V_b_bx];
  (*f_bx_Equ_b_Node_Ptr) +=  +d_staticContributions[admsNodeID_bx][admsProbeID_V_b_bx];
  (*f_e_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_e][admsProbeID_Temp_dt_GND];
  (*f_e_Equ_e_Node_Ptr) +=  +d_staticContributions[admsNodeID_e][admsProbeID_V_e_ei];
  (*f_e_Equ_ei_Node_Ptr) +=  -d_staticContributions[admsNodeID_e][admsProbeID_V_e_ei];
  (*f_ei_Equ_e_Node_Ptr) +=  +d_staticContributions[admsNodeID_ei][admsProbeID_V_e_ei];
  (*f_bp_Equ_cx_Node_Ptr) +=  -d_staticContributions[admsNodeID_bp][admsProbeID_V_bp_cx];
  (*f_si_Equ_bi_Node_Ptr) +=  +d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ei];
  (*f_si_Equ_ei_Node_Ptr) +=  -d_staticContributions[admsNodeID_si][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ei];
  (*f_si_Equ_ci_Node_Ptr) +=  -d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ci];
  (*f_si_Equ_bx_Node_Ptr) +=  +d_staticContributions[admsNodeID_si][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_si][admsProbeID_V_bx_bp];
  (*f_si_Equ_bp_Node_Ptr) +=  -d_staticContributions[admsNodeID_si][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_si][admsProbeID_V_bx_bp];
  (*f_si_Equ_si_Node_Ptr) +=  -d_staticContributions[admsNodeID_si][admsProbeID_V_s_si] +d_staticContributions[admsNodeID_si][admsProbeID_V_si_bp];
  (*f_si_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_si][admsProbeID_Temp_dt_GND];
  (*f_s_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_s][admsProbeID_Temp_dt_GND];
  (*f_s_Equ_s_Node_Ptr) +=  +d_staticContributions[admsNodeID_s][admsProbeID_V_s_si];
  (*f_s_Equ_si_Node_Ptr) +=  -d_staticContributions[admsNodeID_s][admsProbeID_V_s_si];
  (*f_si_Equ_s_Node_Ptr) +=  +d_staticContributions[admsNodeID_si][admsProbeID_V_s_si];
  (*f_xf1_Equ_bi_Node_Ptr) +=  +d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ei] +d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ci];
  (*f_xf1_Equ_ci_Node_Ptr) +=  -d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ci];
  (*f_xf1_Equ_ei_Node_Ptr) +=  -d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ei];
  (*f_xf1_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_xf1][admsProbeID_Temp_dt_GND];
  (*f_xf1_Equ_xf2_Node_Ptr) +=  +d_staticContributions[admsNodeID_xf1][admsProbeID_V_xf2_GND];
  (*f_xf2_Equ_xf1_Node_Ptr) +=  +d_staticContributions[admsNodeID_xf2][admsProbeID_V_xf1_GND];
  (*f_xf2_Equ_xf2_Node_Ptr) +=  +d_staticContributions[admsNodeID_xf2][admsProbeID_V_xf2_GND];
  (*f_dt_Equ_dt_Node_Ptr) +=  +d_staticContributions[admsNodeID_dt][admsProbeID_Temp_dt_GND];
  (*f_dt_Equ_bp_Node_Ptr) +=  -d_staticContributions[admsNodeID_dt][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bp] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bp_cx];
  (*f_dt_Equ_cx_Node_Ptr) +=  -d_staticContributions[admsNodeID_dt][admsProbeID_V_c_cx] +d_staticContributions[admsNodeID_dt][admsProbeID_V_cx_ci] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_cx] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bp_cx];
  (*f_dt_Equ_e_Node_Ptr) +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_e_ei];
  (*f_dt_Equ_ei_Node_Ptr) +=  -d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ei] -d_staticContributions[admsNodeID_dt][admsProbeID_V_ci_ei] -d_staticContributions[admsNodeID_dt][admsProbeID_V_e_ei];
  (*f_dt_Equ_bx_Node_Ptr) +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bp] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_si] -d_staticContributions[admsNodeID_dt][admsProbeID_V_b_bx] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bi];
  (*f_dt_Equ_bi_Node_Ptr) +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ei] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_cx] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bi];
  (*f_dt_Equ_b_Node_Ptr) +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_b_bx];
  (*f_dt_Equ_ci_Node_Ptr) +=  -d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_dt][admsProbeID_V_ci_ei] -d_staticContributions[admsNodeID_dt][admsProbeID_V_cx_ci];
  (*f_dt_Equ_c_Node_Ptr) +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_c_cx];
  (*f_dt_Equ_si_Node_Ptr) +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_dt][admsProbeID_V_s_si] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_si];
  (*f_dt_Equ_s_Node_Ptr) +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_s_si];
  (*f_dt_Equ_xf2_Node_Ptr) +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_xf2_GND];

#else
  //use the offsets instead of pointers
  dFdx[li_bi][A_bi_Equ_bx_NodeOffset] +=  +d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bi] +d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bp];
  dFdx[li_bi][A_bi_Equ_bp_NodeOffset] +=  -d_staticContributions[admsNodeID_bi][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bp];
  dFdx[li_ei][A_ei_Equ_bx_NodeOffset] +=  +d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_bp];
  dFdx[li_ei][A_ei_Equ_bp_NodeOffset] +=  -d_staticContributions[admsNodeID_ei][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_bp];
  dFdx[li_bi][A_bi_Equ_si_NodeOffset] +=  +d_staticContributions[admsNodeID_bi][admsProbeID_V_si_bp];
  dFdx[li_ei][A_ei_Equ_si_NodeOffset] +=  +d_staticContributions[admsNodeID_ei][admsProbeID_V_si_bp];
  dFdx[li_bi][A_bi_Equ_bi_NodeOffset] +=  -d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_bi] +d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ei] +d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ci];
  dFdx[li_bi][A_bi_Equ_ci_NodeOffset] +=  -d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ci];
  dFdx[li_ei][A_ei_Equ_bi_NodeOffset] +=  +d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ei] +d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ci];
  dFdx[li_ei][A_ei_Equ_ci_NodeOffset] +=  -d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ci];
  dFdx[li_bi][A_bi_Equ_ei_NodeOffset] +=  -d_staticContributions[admsNodeID_bi][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_bi][admsProbeID_V_bi_ei];
  dFdx[li_ei][A_ei_Equ_ei_NodeOffset] +=  -d_staticContributions[admsNodeID_ei][admsProbeID_V_e_ei] -d_staticContributions[admsNodeID_ei][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_ei][admsProbeID_V_bi_ei];
  dFdx[li_bi][A_bi_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND];
  dFdx[li_ei][A_ei_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND];
  dFdx[li_bx][A_bx_Equ_bi_NodeOffset] +=  -d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bi] +d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ei];
  dFdx[li_bx][A_bx_Equ_ei_NodeOffset] +=  -d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ei];
  dFdx[li_bx][A_bx_Equ_ci_NodeOffset] +=  -d_staticContributions[admsNodeID_bx][admsProbeID_V_bi_ci];
  dFdx[li_bx][A_bx_Equ_bx_NodeOffset] +=  +d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bi] -d_staticContributions[admsNodeID_bx][admsProbeID_V_b_bx] +d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_cx] +d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bp];
  dFdx[li_bx][A_bx_Equ_bp_NodeOffset] +=  -d_staticContributions[admsNodeID_bx][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_bp];
  dFdx[li_bx][A_bx_Equ_si_NodeOffset] +=  +d_staticContributions[admsNodeID_bx][admsProbeID_V_si_bp];
  dFdx[li_bx][A_bx_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND];
  dFdx[li_ci][A_ci_Equ_xf2_NodeOffset] +=  +d_staticContributions[admsNodeID_ci][admsProbeID_V_xf2_GND];
  dFdx[li_ei][A_ei_Equ_xf2_NodeOffset] +=  +d_staticContributions[admsNodeID_ei][admsProbeID_V_xf2_GND];
  dFdx[li_ci][A_ci_Equ_bi_NodeOffset] +=  +d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_cx] +d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ei];
  dFdx[li_ci][A_ci_Equ_ei_NodeOffset] +=  -d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ei];
  dFdx[li_ci][A_ci_Equ_ci_NodeOffset] +=  -d_staticContributions[admsNodeID_ci][admsProbeID_V_cx_ci] -d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_ci];
  dFdx[li_ci][A_ci_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_ci][admsProbeID_Temp_dt_GND];
  dFdx[li_bi][A_bi_Equ_xf2_NodeOffset] +=  +d_staticContributions[admsNodeID_bi][admsProbeID_V_xf2_GND];
  dFdx[li_ci][A_ci_Equ_bx_NodeOffset] +=  +d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_bp];
  dFdx[li_ci][A_ci_Equ_bp_NodeOffset] +=  -d_staticContributions[admsNodeID_ci][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_ci][admsProbeID_V_bx_bp];
  dFdx[li_ci][A_ci_Equ_si_NodeOffset] +=  +d_staticContributions[admsNodeID_ci][admsProbeID_V_si_bp];
  dFdx[li_cx][A_cx_Equ_bi_NodeOffset] +=  +d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ei] +d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_cx] +d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ci];
  dFdx[li_cx][A_cx_Equ_ci_NodeOffset] +=  -d_staticContributions[admsNodeID_cx][admsProbeID_V_cx_ci] -d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ci];
  dFdx[li_bx][A_bx_Equ_cx_NodeOffset] +=  -d_staticContributions[admsNodeID_bx][admsProbeID_V_c_cx] -d_staticContributions[admsNodeID_bx][admsProbeID_V_bx_cx];
  dFdx[li_cx][A_cx_Equ_bx_NodeOffset] +=  +d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_bp] +d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_cx];
  dFdx[li_cx][A_cx_Equ_cx_NodeOffset] +=  -d_staticContributions[admsNodeID_cx][admsProbeID_V_bp_cx] +d_staticContributions[admsNodeID_cx][admsProbeID_V_cx_ci] -d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_cx] -d_staticContributions[admsNodeID_cx][admsProbeID_V_c_cx] -d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_cx];
  dFdx[li_cx][A_cx_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_cx][admsProbeID_Temp_dt_GND];
  dFdx[li_bx][A_bx_Equ_c_NodeOffset] +=  +d_staticContributions[admsNodeID_bx][admsProbeID_V_c_cx];
  dFdx[li_cx][A_cx_Equ_c_NodeOffset] +=  +d_staticContributions[admsNodeID_cx][admsProbeID_V_c_cx];
  dFdx[li_bp][A_bp_Equ_bi_NodeOffset] +=  +d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ei];
  dFdx[li_bp][A_bp_Equ_ei_NodeOffset] +=  -d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ei];
  dFdx[li_bp][A_bp_Equ_ci_NodeOffset] +=  -d_staticContributions[admsNodeID_bp][admsProbeID_V_bi_ci];
  dFdx[li_bp][A_bp_Equ_bx_NodeOffset] +=  +d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_bp];
  dFdx[li_bp][A_bp_Equ_bp_NodeOffset] +=  +d_staticContributions[admsNodeID_bp][admsProbeID_V_bp_cx] -d_staticContributions[admsNodeID_bp][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_bp][admsProbeID_V_bx_bp];
  dFdx[li_bp][A_bp_Equ_si_NodeOffset] +=  +d_staticContributions[admsNodeID_bp][admsProbeID_V_si_bp];
  dFdx[li_bp][A_bp_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_bp][admsProbeID_Temp_dt_GND];
  dFdx[li_c][A_c_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_c][admsProbeID_Temp_dt_GND];
  dFdx[li_c][A_c_Equ_c_NodeOffset] +=  +d_staticContributions[admsNodeID_c][admsProbeID_V_c_cx];
  dFdx[li_c][A_c_Equ_cx_NodeOffset] +=  -d_staticContributions[admsNodeID_c][admsProbeID_V_c_cx];
  dFdx[li_ci][A_ci_Equ_cx_NodeOffset] +=  +d_staticContributions[admsNodeID_ci][admsProbeID_V_cx_ci] -d_staticContributions[admsNodeID_ci][admsProbeID_V_bi_cx];
  dFdx[li_cx][A_cx_Equ_ei_NodeOffset] +=  -d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_cx][admsProbeID_V_bi_ei];
  dFdx[li_cx][A_cx_Equ_bp_NodeOffset] +=  +d_staticContributions[admsNodeID_cx][admsProbeID_V_bp_cx] -d_staticContributions[admsNodeID_cx][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_cx][admsProbeID_V_bx_bp];
  dFdx[li_cx][A_cx_Equ_si_NodeOffset] +=  +d_staticContributions[admsNodeID_cx][admsProbeID_V_si_bp];
  dFdx[li_b][A_b_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_b][admsProbeID_Temp_dt_GND];
  dFdx[li_b][A_b_Equ_b_NodeOffset] +=  +d_staticContributions[admsNodeID_b][admsProbeID_V_b_bx];
  dFdx[li_b][A_b_Equ_bx_NodeOffset] +=  -d_staticContributions[admsNodeID_b][admsProbeID_V_b_bx];
  dFdx[li_bx][A_bx_Equ_b_NodeOffset] +=  +d_staticContributions[admsNodeID_bx][admsProbeID_V_b_bx];
  dFdx[li_e][A_e_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_e][admsProbeID_Temp_dt_GND];
  dFdx[li_e][A_e_Equ_e_NodeOffset] +=  +d_staticContributions[admsNodeID_e][admsProbeID_V_e_ei];
  dFdx[li_e][A_e_Equ_ei_NodeOffset] +=  -d_staticContributions[admsNodeID_e][admsProbeID_V_e_ei];
  dFdx[li_ei][A_ei_Equ_e_NodeOffset] +=  +d_staticContributions[admsNodeID_ei][admsProbeID_V_e_ei];
  dFdx[li_bp][A_bp_Equ_cx_NodeOffset] +=  -d_staticContributions[admsNodeID_bp][admsProbeID_V_bp_cx];
  dFdx[li_si][A_si_Equ_bi_NodeOffset] +=  +d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ei];
  dFdx[li_si][A_si_Equ_ei_NodeOffset] +=  -d_staticContributions[admsNodeID_si][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ei];
  dFdx[li_si][A_si_Equ_ci_NodeOffset] +=  -d_staticContributions[admsNodeID_si][admsProbeID_V_bi_ci];
  dFdx[li_si][A_si_Equ_bx_NodeOffset] +=  +d_staticContributions[admsNodeID_si][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_si][admsProbeID_V_bx_bp];
  dFdx[li_si][A_si_Equ_bp_NodeOffset] +=  -d_staticContributions[admsNodeID_si][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_si][admsProbeID_V_bx_bp];
  dFdx[li_si][A_si_Equ_si_NodeOffset] +=  -d_staticContributions[admsNodeID_si][admsProbeID_V_s_si] +d_staticContributions[admsNodeID_si][admsProbeID_V_si_bp];
  dFdx[li_si][A_si_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_si][admsProbeID_Temp_dt_GND];
  dFdx[li_s][A_s_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_s][admsProbeID_Temp_dt_GND];
  dFdx[li_s][A_s_Equ_s_NodeOffset] +=  +d_staticContributions[admsNodeID_s][admsProbeID_V_s_si];
  dFdx[li_s][A_s_Equ_si_NodeOffset] +=  -d_staticContributions[admsNodeID_s][admsProbeID_V_s_si];
  dFdx[li_si][A_si_Equ_s_NodeOffset] +=  +d_staticContributions[admsNodeID_si][admsProbeID_V_s_si];
  dFdx[li_xf1][A_xf1_Equ_bi_NodeOffset] +=  +d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ei] +d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ci];
  dFdx[li_xf1][A_xf1_Equ_ci_NodeOffset] +=  -d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ci];
  dFdx[li_xf1][A_xf1_Equ_ei_NodeOffset] +=  -d_staticContributions[admsNodeID_xf1][admsProbeID_V_bi_ei];
  dFdx[li_xf1][A_xf1_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_xf1][admsProbeID_Temp_dt_GND];
  dFdx[li_xf1][A_xf1_Equ_xf2_NodeOffset] +=  +d_staticContributions[admsNodeID_xf1][admsProbeID_V_xf2_GND];
  dFdx[li_xf2][A_xf2_Equ_xf1_NodeOffset] +=  +d_staticContributions[admsNodeID_xf2][admsProbeID_V_xf1_GND];
  dFdx[li_xf2][A_xf2_Equ_xf2_NodeOffset] +=  +d_staticContributions[admsNodeID_xf2][admsProbeID_V_xf2_GND];
  dFdx[li_dt][A_dt_Equ_dt_NodeOffset] +=  +d_staticContributions[admsNodeID_dt][admsProbeID_Temp_dt_GND];
  dFdx[li_dt][A_dt_Equ_bp_NodeOffset] +=  -d_staticContributions[admsNodeID_dt][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bp] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bp_cx];
  dFdx[li_dt][A_dt_Equ_cx_NodeOffset] +=  -d_staticContributions[admsNodeID_dt][admsProbeID_V_c_cx] +d_staticContributions[admsNodeID_dt][admsProbeID_V_cx_ci] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_cx] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bp_cx];
  dFdx[li_dt][A_dt_Equ_e_NodeOffset] +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_e_ei];
  dFdx[li_dt][A_dt_Equ_ei_NodeOffset] +=  -d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_ei] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ei] -d_staticContributions[admsNodeID_dt][admsProbeID_V_ci_ei] -d_staticContributions[admsNodeID_dt][admsProbeID_V_e_ei];
  dFdx[li_dt][A_dt_Equ_bx_NodeOffset] +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_ei] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bp] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_si] -d_staticContributions[admsNodeID_dt][admsProbeID_V_b_bx] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bi];
  dFdx[li_dt][A_dt_Equ_bi_NodeOffset] +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ei] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_cx] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_bi];
  dFdx[li_dt][A_dt_Equ_b_NodeOffset] +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_b_bx];
  dFdx[li_dt][A_dt_Equ_ci_NodeOffset] +=  -d_staticContributions[admsNodeID_dt][admsProbeID_V_bi_ci] +d_staticContributions[admsNodeID_dt][admsProbeID_V_ci_ei] -d_staticContributions[admsNodeID_dt][admsProbeID_V_cx_ci];
  dFdx[li_dt][A_dt_Equ_c_NodeOffset] +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_c_cx];
  dFdx[li_dt][A_dt_Equ_si_NodeOffset] +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_si_bp] -d_staticContributions[admsNodeID_dt][admsProbeID_V_s_si] -d_staticContributions[admsNodeID_dt][admsProbeID_V_bx_si];
  dFdx[li_dt][A_dt_Equ_s_NodeOffset] +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_s_si];
  dFdx[li_dt][A_dt_Equ_xf2_NodeOffset] +=  +d_staticContributions[admsNodeID_dt][admsProbeID_V_xf2_GND];

#endif

  return bsuccess;
}


//-----------------------------------------------------------------------------
// Function      : Instance::loadDAEdQdx
// Purpose       :
// Special Notes : Load the dQdx ("dynamic jacobian") matrix
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
bool Instance::loadDAEdQdx()
{
  bool bsuccess = true;
  Linear::Matrix & dQdx = *(extData.dQdxMatrixPtr);

#ifndef Xyce_NONPOINTER_MATRIX_LOAD
  (*q_bi_Equ_bx_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_ei] +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_bp];
  (*q_bi_Equ_bp_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_si_bp] -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_bp];
  (*q_ei_Equ_bx_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_ei] +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_bp];
  (*q_ei_Equ_bp_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_si_bp] -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_bp];
  (*q_bi_Equ_si_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_si_bp];
  (*q_ei_Equ_si_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_si_bp];
  (*q_bi_Equ_bi_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ei] +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ci] +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_cx];
  (*q_bi_Equ_ci_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ci];
  (*q_ei_Equ_bi_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ei] +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ci] +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_cx];
  (*q_ei_Equ_ci_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ci];
  (*q_bi_Equ_ei_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ei] -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_ei];
  (*q_ei_Equ_ei_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ei] -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_ei];
  (*q_bi_Equ_dt_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND];
  (*q_ei_Equ_dt_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND];
  (*q_bx_Equ_bi_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ci] +d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ei];
  (*q_bx_Equ_ei_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ei] -d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_ei];
  (*q_bx_Equ_ci_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ci];
  (*q_bx_Equ_bx_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_bp] +d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_ei];
  (*q_bx_Equ_bp_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_bp];
  (*q_bx_Equ_dt_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND];
  (*q_ci_Equ_bi_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ci] +d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ei];
  (*q_ci_Equ_ei_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ei] -d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_ei];
  (*q_ci_Equ_ci_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ci];
  (*q_ci_Equ_dt_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_ci][admsProbeID_Temp_dt_GND];
  (*q_ci_Equ_bx_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_ei] +d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_bp];
  (*q_ci_Equ_bp_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_ci][admsProbeID_V_si_bp] -d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_bp];
  (*q_ci_Equ_si_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_ci][admsProbeID_V_si_bp];
  (*q_cx_Equ_bi_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_cx] +d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ei] +d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ci];
  (*q_cx_Equ_ci_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ci];
  (*q_cx_Equ_bx_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bx_bp];
  (*q_cx_Equ_cx_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_cx];
  (*q_cx_Equ_dt_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_cx][admsProbeID_Temp_dt_GND];
  (*q_bp_Equ_bi_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ci] +d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ei];
  (*q_bp_Equ_ei_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ei];
  (*q_bp_Equ_ci_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ci];
  (*q_bp_Equ_bx_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bx_bp];
  (*q_bp_Equ_bp_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_bp][admsProbeID_V_si_bp] -d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bx_bp];
  (*q_bp_Equ_si_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_bp][admsProbeID_V_si_bp];
  (*q_bp_Equ_dt_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_bp][admsProbeID_Temp_dt_GND];
  (*q_c_Equ_c_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_c][admsProbeID_V_b_c];
  (*q_cx_Equ_ei_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ei];
  (*q_cx_Equ_bp_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bx_bp];
  (*q_b_Equ_b_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_c] +d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_e];
  (*q_e_Equ_e_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_e][admsProbeID_V_b_e];
  (*q_si_Equ_bp_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_si][admsProbeID_V_si_bp];
  (*q_si_Equ_si_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_si][admsProbeID_V_si_bp];
  (*q_si_Equ_dt_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_si][admsProbeID_Temp_dt_GND];
  (*q_xf2_Equ_xf2_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_xf2_GND];
  (*q_dt_Equ_dt_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_dt][admsProbeID_Temp_dt_GND];
  (*q_bi_Equ_cx_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_cx];
  (*q_ei_Equ_cx_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_cx];
  (*q_b_Equ_e_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_e];
  (*q_e_Equ_b_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_e][admsProbeID_V_b_e];
  (*q_b_Equ_c_Node_Ptr) +=  -d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_c];
  (*q_c_Equ_b_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_c][admsProbeID_V_b_c];
  (*q_xf1_Equ_xf1_Node_Ptr) +=  +d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_xf1_GND];

#else
  //use the offsets instead of pointers
  dQdx[li_bi][A_bi_Equ_bx_NodeOffset] +=  +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_ei] +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_bp];
  dQdx[li_bi][A_bi_Equ_bp_NodeOffset] +=  -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_si_bp] -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_bp];
  dQdx[li_ei][A_ei_Equ_bx_NodeOffset] +=  +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_ei] +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_bp];
  dQdx[li_ei][A_ei_Equ_bp_NodeOffset] +=  -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_si_bp] -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_bp];
  dQdx[li_bi][A_bi_Equ_si_NodeOffset] +=  +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_si_bp];
  dQdx[li_ei][A_ei_Equ_si_NodeOffset] +=  +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_si_bp];
  dQdx[li_bi][A_bi_Equ_bi_NodeOffset] +=  +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ei] +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ci] +d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_cx];
  dQdx[li_bi][A_bi_Equ_ci_NodeOffset] +=  -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ci];
  dQdx[li_ei][A_ei_Equ_bi_NodeOffset] +=  +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ei] +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ci] +d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_cx];
  dQdx[li_ei][A_ei_Equ_ci_NodeOffset] +=  -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ci];
  dQdx[li_bi][A_bi_Equ_ei_NodeOffset] +=  -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_ei] -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bx_ei];
  dQdx[li_ei][A_ei_Equ_ei_NodeOffset] +=  -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_ei] -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bx_ei];
  dQdx[li_bi][A_bi_Equ_dt_NodeOffset] +=  +d_dynamicContributions[admsNodeID_bi][admsProbeID_Temp_dt_GND];
  dQdx[li_ei][A_ei_Equ_dt_NodeOffset] +=  +d_dynamicContributions[admsNodeID_ei][admsProbeID_Temp_dt_GND];
  dQdx[li_bx][A_bx_Equ_bi_NodeOffset] +=  +d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ci] +d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ei];
  dQdx[li_bx][A_bx_Equ_ei_NodeOffset] +=  -d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ei] -d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_ei];
  dQdx[li_bx][A_bx_Equ_ci_NodeOffset] +=  -d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bi_ci];
  dQdx[li_bx][A_bx_Equ_bx_NodeOffset] +=  +d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_bp] +d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_ei];
  dQdx[li_bx][A_bx_Equ_bp_NodeOffset] +=  -d_dynamicContributions[admsNodeID_bx][admsProbeID_V_bx_bp];
  dQdx[li_bx][A_bx_Equ_dt_NodeOffset] +=  +d_dynamicContributions[admsNodeID_bx][admsProbeID_Temp_dt_GND];
  dQdx[li_ci][A_ci_Equ_bi_NodeOffset] +=  +d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ci] +d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ei];
  dQdx[li_ci][A_ci_Equ_ei_NodeOffset] +=  -d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ei] -d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_ei];
  dQdx[li_ci][A_ci_Equ_ci_NodeOffset] +=  -d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bi_ci];
  dQdx[li_ci][A_ci_Equ_dt_NodeOffset] +=  +d_dynamicContributions[admsNodeID_ci][admsProbeID_Temp_dt_GND];
  dQdx[li_ci][A_ci_Equ_bx_NodeOffset] +=  +d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_ei] +d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_bp];
  dQdx[li_ci][A_ci_Equ_bp_NodeOffset] +=  -d_dynamicContributions[admsNodeID_ci][admsProbeID_V_si_bp] -d_dynamicContributions[admsNodeID_ci][admsProbeID_V_bx_bp];
  dQdx[li_ci][A_ci_Equ_si_NodeOffset] +=  +d_dynamicContributions[admsNodeID_ci][admsProbeID_V_si_bp];
  dQdx[li_cx][A_cx_Equ_bi_NodeOffset] +=  +d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_cx] +d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ei] +d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ci];
  dQdx[li_cx][A_cx_Equ_ci_NodeOffset] +=  -d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ci];
  dQdx[li_cx][A_cx_Equ_bx_NodeOffset] +=  +d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bx_bp];
  dQdx[li_cx][A_cx_Equ_cx_NodeOffset] +=  -d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_cx];
  dQdx[li_cx][A_cx_Equ_dt_NodeOffset] +=  +d_dynamicContributions[admsNodeID_cx][admsProbeID_Temp_dt_GND];
  dQdx[li_bp][A_bp_Equ_bi_NodeOffset] +=  +d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ci] +d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ei];
  dQdx[li_bp][A_bp_Equ_ei_NodeOffset] +=  -d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ei];
  dQdx[li_bp][A_bp_Equ_ci_NodeOffset] +=  -d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bi_ci];
  dQdx[li_bp][A_bp_Equ_bx_NodeOffset] +=  +d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bx_bp];
  dQdx[li_bp][A_bp_Equ_bp_NodeOffset] +=  -d_dynamicContributions[admsNodeID_bp][admsProbeID_V_si_bp] -d_dynamicContributions[admsNodeID_bp][admsProbeID_V_bx_bp];
  dQdx[li_bp][A_bp_Equ_si_NodeOffset] +=  +d_dynamicContributions[admsNodeID_bp][admsProbeID_V_si_bp];
  dQdx[li_bp][A_bp_Equ_dt_NodeOffset] +=  +d_dynamicContributions[admsNodeID_bp][admsProbeID_Temp_dt_GND];
  dQdx[li_c][A_c_Equ_c_NodeOffset] +=  -d_dynamicContributions[admsNodeID_c][admsProbeID_V_b_c];
  dQdx[li_cx][A_cx_Equ_ei_NodeOffset] +=  -d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bi_ei];
  dQdx[li_cx][A_cx_Equ_bp_NodeOffset] +=  -d_dynamicContributions[admsNodeID_cx][admsProbeID_V_bx_bp];
  dQdx[li_b][A_b_Equ_b_NodeOffset] +=  +d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_c] +d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_e];
  dQdx[li_e][A_e_Equ_e_NodeOffset] +=  -d_dynamicContributions[admsNodeID_e][admsProbeID_V_b_e];
  dQdx[li_si][A_si_Equ_bp_NodeOffset] +=  -d_dynamicContributions[admsNodeID_si][admsProbeID_V_si_bp];
  dQdx[li_si][A_si_Equ_si_NodeOffset] +=  +d_dynamicContributions[admsNodeID_si][admsProbeID_V_si_bp];
  dQdx[li_si][A_si_Equ_dt_NodeOffset] +=  +d_dynamicContributions[admsNodeID_si][admsProbeID_Temp_dt_GND];
  dQdx[li_xf2][A_xf2_Equ_xf2_NodeOffset] +=  +d_dynamicContributions[admsNodeID_xf2][admsProbeID_V_xf2_GND];
  dQdx[li_dt][A_dt_Equ_dt_NodeOffset] +=  +d_dynamicContributions[admsNodeID_dt][admsProbeID_Temp_dt_GND];
  dQdx[li_bi][A_bi_Equ_cx_NodeOffset] +=  -d_dynamicContributions[admsNodeID_bi][admsProbeID_V_bi_cx];
  dQdx[li_ei][A_ei_Equ_cx_NodeOffset] +=  -d_dynamicContributions[admsNodeID_ei][admsProbeID_V_bi_cx];
  dQdx[li_b][A_b_Equ_e_NodeOffset] +=  -d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_e];
  dQdx[li_e][A_e_Equ_b_NodeOffset] +=  +d_dynamicContributions[admsNodeID_e][admsProbeID_V_b_e];
  dQdx[li_b][A_b_Equ_c_NodeOffset] +=  -d_dynamicContributions[admsNodeID_b][admsProbeID_V_b_c];
  dQdx[li_c][A_c_Equ_b_NodeOffset] +=  +d_dynamicContributions[admsNodeID_c][admsProbeID_V_b_c];
  dQdx[li_xf1][A_xf1_Equ_xf1_NodeOffset] +=  +d_dynamicContributions[admsNodeID_xf1][admsProbeID_V_xf1_GND];


#endif
  return bsuccess;
}




//-----------------------------------------------------------------------------
// Function      : Instance::updateTemperature
// Purpose       : Set temperature and update any parameters that depend on it
// Special Notes : In Xyce ADMS, we'll simply copy the temperature, which is
//                 in Kelvin, to our "admsTemperature" variable, which needs
//                 to be in Celsius.
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
bool Instance::updateTemperature(const double & temperatureTemp)
{

  admsTemperature = temperatureTemp;
  adms_vt_nom = adms_vt(temperatureTemp);

  return true;
}

// Class Model
//-----------------------------------------------------------------------------
// Function      : Model::processParams
// Purpose       :
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
bool Model::processParams()
{

  // Set any non-constant parameter defaults:
  // Set any parameters that were not given and whose defaults depend on other
  // parameters:

// set internal model type based on model card type
if (getType() == "pnp" || getType() == "PNP")
    VBICtype = -1;



  // Now we need to check that any parameters are within their ranges as
  // specified in the verilog:

//    Parameter type : [ (-1), 1 ]] 0, 0 [
  if ( (!((type >=(-1) && type <=1 )) || (type >0 && type <0 )) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter type value " << type << " out of range [ (-1), 1 ] or  ] 0, 0 [";
  }

//    Parameter VBICtype : [ (-1), 1 ][ 0, 0 ]
  if ( (!((VBICtype >=(-1) && VBICtype <=1 )) || (VBICtype >=0 && VBICtype <=0 )) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter VBICtype value " << VBICtype << " out of range [ (-1), 1 ] or in excluded range [ 0, 0 ]";
  }

//    Parameter scale : ] 0.0, 1.0 ]
  if ( (!((scale >0.0 && scale <=1.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter scale value " << scale << " out of range ] 0.0, 1.0 ]";
  }

//    Parameter shrink : [ 0.0, 100.0 [
  if ( (!((shrink >=0.0 && shrink <100.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter shrink value " << shrink << " out of range [ 0.0, 100.0 [";
  }

//    Parameter tmin : [ (-250.0), 27.0 ]
  if ( (!((tmin >=(-250.0) && tmin <=27.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter tmin value " << tmin << " out of range [ (-250.0), 27.0 ]";
  }

//    Parameter tmax : [ 27.0, 1000.0 ]
  if ( (!((tmax >=27.0 && tmax <=1000.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter tmax value " << tmax << " out of range [ 27.0, 1000.0 ]";
  }

//    Parameter gmin : [ 0.0,  (+inf) [
  if ( (!((gmin >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter gmin value " << gmin << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter pnjmaxi : ] 0.0,  (+inf) [
  if ( (!((pnjmaxi >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter pnjmaxi value " << pnjmaxi << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter maxexp : ] 0.0,  (+inf) [
  if ( (!((maxexp >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter maxexp value " << maxexp << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter tnom : [ (-250.0), 1000.0 ]
  if ( (!((tnom >=(-250.0) && tnom <=1000.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter tnom value " << tnom << " out of range [ (-250.0), 1000.0 ]";
  }

//    Parameter tminclip : [ (-250.0), 27.0 ]
  if ( (!((tminclip >=(-250.0) && tminclip <=27.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter tminclip value " << tminclip << " out of range [ (-250.0), 27.0 ]";
  }

//    Parameter tmaxclip : [ 27.0, 1000.0 ]
  if ( (!((tmaxclip >=27.0 && tmaxclip <=1000.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter tmaxclip value " << tmaxclip << " out of range [ 27.0, 1000.0 ]";
  }

//    Parameter rcx : [ 0.0,  (+inf) [
  if ( (!((rcx >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter rcx value " << rcx << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter rci : [ 0.0,  (+inf) [
  if ( (!((rci >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter rci value " << rci << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter vo : [ 0.0,  (+inf) [
  if ( (!((vo >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter vo value " << vo << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter gamm : [ 0.0,  (+inf) [
  if ( (!((gamm >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter gamm value " << gamm << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter hrcf : [ 0.0,  (+inf) [
  if ( (!((hrcf >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter hrcf value " << hrcf << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter rbx : [ 0.0,  (+inf) [
  if ( (!((rbx >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter rbx value " << rbx << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter rbi : [ 0.0,  (+inf) [
  if ( (!((rbi >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter rbi value " << rbi << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter re : [ 0.0,  (+inf) [
  if ( (!((re >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter re value " << re << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter rs : [ 0.0,  (+inf) [
  if ( (!((rs >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter rs value " << rs << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter rbp : [ 0.0,  (+inf) [
  if ( (!((rbp >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter rbp value " << rbp << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter is : ] 0.0,  (+inf) [
  if ( (!((is >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter is value " << is << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter isrr : ] 0.0,  (+inf) [
  if ( (!((isrr >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter isrr value " << isrr << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter nf : ] 0.0,  (+inf) [
  if ( (!((nf >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter nf value " << nf << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter nr : ] 0.0,  (+inf) [
  if ( (!((nr >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter nr value " << nr << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter qbm : [ 0, 1 ]
  if ( (!((qbm >=0 && qbm <=1 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter qbm value " << qbm << " out of range [ 0, 1 ]";
  }

//    Parameter isp : [ 0.0,  (+inf) [
  if ( (!((isp >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter isp value " << isp << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter wsp : [ 0.0, 1.0 ]
  if ( (!((wsp >=0.0 && wsp <=1.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter wsp value " << wsp << " out of range [ 0.0, 1.0 ]";
  }

//    Parameter nfp : ] 0.0,  (+inf) [
  if ( (!((nfp >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter nfp value " << nfp << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter fc : [ 0.0, 1.0 [
  if ( (!((fc >=0.0 && fc <1.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter fc value " << fc << " out of range [ 0.0, 1.0 [";
  }

//    Parameter cbeo : [ 0.0,  (+inf) [
  if ( (!((cbeo >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter cbeo value " << cbeo << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter cje : [ 0.0,  (+inf) [
  if ( (!((cje >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter cje value " << cje << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter pe : ] 0.0,  (+inf) [
  if ( (!((pe >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter pe value " << pe << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter me : ] 0.0, 1.0 ]
  if ( (!((me >0.0 && me <=1.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter me value " << me << " out of range ] 0.0, 1.0 ]";
  }

//    Parameter cbco : [ 0.0,  (+inf) [
  if ( (!((cbco >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter cbco value " << cbco << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter cjc : [ 0.0,  (+inf) [
  if ( (!((cjc >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter cjc value " << cjc << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter pc : ] 0.0,  (+inf) [
  if ( (!((pc >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter pc value " << pc << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter mc : ] 0.0, 1.0 ]
  if ( (!((mc >0.0 && mc <=1.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter mc value " << mc << " out of range ] 0.0, 1.0 ]";
  }

//    Parameter vrt : [ 0.0,  (+inf) [
  if ( (!((vrt >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter vrt value " << vrt << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter art : ] 0.0,  (+inf) [
  if ( (!((art >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter art value " << art << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter qco : [ 0.0,  (+inf) [
  if ( (!((qco >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter qco value " << qco << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter cjep : [ 0.0,  (+inf) [
  if ( (!((cjep >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter cjep value " << cjep << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter cjcp : [ 0.0,  (+inf) [
  if ( (!((cjcp >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter cjcp value " << cjcp << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter ps : ] 0.0,  (+inf) [
  if ( (!((ps >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ps value " << ps << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter ms : ] 0.0, 1.0 ]
  if ( (!((ms >0.0 && ms <=1.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ms value " << ms << " out of range ] 0.0, 1.0 ]";
  }

//    Parameter ccso : [ 0.0,  (+inf) [
  if ( (!((ccso >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ccso value " << ccso << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter ibei : [ 0.0,  (+inf) [
  if ( (!((ibei >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ibei value " << ibei << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter wbe : [ 0.0, 1.0 ]
  if ( (!((wbe >=0.0 && wbe <=1.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter wbe value " << wbe << " out of range [ 0.0, 1.0 ]";
  }

//    Parameter nei : ] 0.0,  (+inf) [
  if ( (!((nei >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter nei value " << nei << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter qnibeir : [ 0.0, 1.0 ]
  if ( (!((qnibeir >=0.0 && qnibeir <=1.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter qnibeir value " << qnibeir << " out of range [ 0.0, 1.0 ]";
  }

//    Parameter iben : [ 0.0,  (+inf) [
  if ( (!((iben >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter iben value " << iben << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter nen : ] nei,  (+inf) [
  if ( (!((nen >nei))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter nen value " << nen << " out of range ] nei,  (+inf) [";
  }

//    Parameter ibci : [ 0.0,  (+inf) [
  if ( (!((ibci >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ibci value " << ibci << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter nci : ] 0.0,  (+inf) [
  if ( (!((nci >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter nci value " << nci << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter ibcn : [ 0.0,  (+inf) [
  if ( (!((ibcn >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ibcn value " << ibcn << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter ncn : ] nci,  (+inf) [
  if ( (!((ncn >nci))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ncn value " << ncn << " out of range ] nci,  (+inf) [";
  }

//    Parameter ibeip : [ 0.0,  (+inf) [
  if ( (!((ibeip >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ibeip value " << ibeip << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter ibenp : [ 0.0,  (+inf) [
  if ( (!((ibenp >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ibenp value " << ibenp << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter ibcip : [ 0.0,  (+inf) [
  if ( (!((ibcip >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ibcip value " << ibcip << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter ncip : ] 0.0,  (+inf) [
  if ( (!((ncip >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ncip value " << ncip << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter ibcnp : [ 0.0,  (+inf) [
  if ( (!((ibcnp >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ibcnp value " << ibcnp << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter ncnp : ] ncip,  (+inf) [
  if ( (!((ncnp >ncip))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ncnp value " << ncnp << " out of range ] ncip,  (+inf) [";
  }

//    Parameter vef : [ 0.0,  (+inf) [
  if ( (!((vef >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter vef value " << vef << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter ver : [ 0.0,  (+inf) [
  if ( (!((ver >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ver value " << ver << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter ikf : [ 0.0,  (+inf) [
  if ( (!((ikf >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ikf value " << ikf << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter nkf : ] 0.0,  (+inf) [
  if ( (!((nkf >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter nkf value " << nkf << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter ikr : [ 0.0,  (+inf) [
  if ( (!((ikr >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ikr value " << ikr << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter ikp : [ 0.0,  (+inf) [
  if ( (!((ikp >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ikp value " << ikp << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter tf : [ 0.0,  (+inf) [
  if ( (!((tf >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter tf value " << tf << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter qtf : [ 0.0,  (+inf) [
  if ( (!((qtf >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter qtf value " << qtf << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter xtf : [ 0.0,  (+inf) [
  if ( (!((xtf >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter xtf value " << xtf << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter vtf : [ 0.0,  (+inf) [
  if ( (!((vtf >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter vtf value " << vtf << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter itf : [ 0.0,  (+inf) [
  if ( (!((itf >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter itf value " << itf << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter tr : [ 0.0,  (+inf) [
  if ( (!((tr >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter tr value " << tr << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter td : [ 0.0,  (+inf) [
  if ( (!((td >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter td value " << td << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter avc1 : [ 0.0,  (+inf) [
  if ( (!((avc1 >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter avc1 value " << avc1 << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter avc2 : [ 0.0,  (+inf) [
  if ( (!((avc2 >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter avc2 value " << avc2 << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter avcx1 : [ 0.0,  (+inf) [
  if ( (!((avcx1 >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter avcx1 value " << avcx1 << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter avcx2 : [ 0.0,  (+inf) [
  if ( (!((avcx2 >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter avcx2 value " << avcx2 << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter mcx : ] 0.0, 1.0 ]
  if ( (!((mcx >0.0 && mcx <=1.0 ))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter mcx value " << mcx << " out of range ] 0.0, 1.0 ]";
  }

//    Parameter vbbe : [ 0.0,  (+inf) [
  if ( (!((vbbe >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter vbbe value " << vbbe << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter nbbe : ] 0.0,  (+inf) [
  if ( (!((nbbe >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter nbbe value " << nbbe << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter ibbe : ] 0.0,  (+inf) [
  if ( (!((ibbe >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ibbe value " << ibbe << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter vpte : [ 0.0,  (+inf) [
  if ( (!((vpte >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter vpte value " << vpte << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter ibk0 : [ 0.0,  (+inf) [
  if ( (!((ibk0 >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter ibk0 value " << ibk0 << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter abk : ] 0.0,  (+inf) [
  if ( (!((abk >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter abk value " << abk << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter bbk : [ 0.0,  (+inf) [
  if ( (!((bbk >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter bbk value " << bbk << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter kfn : [ 0.0,  (+inf) [
  if ( (!((kfn >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter kfn value " << kfn << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter afn : ] 0.0,  (+inf) [
  if ( (!((afn >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter afn value " << afn << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter bfn : ] 0.0,  (+inf) [
  if ( (!((bfn >0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter bfn value " << bfn << " out of range ] 0.0,  (+inf) [";
  }

//    Parameter rth : [ 0.0,  (+inf) [
  if ( (!((rth >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter rth value " << rth << " out of range [ 0.0,  (+inf) [";
  }

//    Parameter cth : [ 0.0,  (+inf) [
  if ( (!((cth >=0.0))) )
  {
    UserWarning(*this) << "ADMSvbic13_4t: Parameter cth value " << cth << " out of range [ 0.0,  (+inf) [";
  }

  // and of course, this routine is where we should put the initial_model
  // stuff
  double shrinkL=0.0;
  double scaleFac=0.0;
//Begin block initial_model
{
scaleFac = scale;
shrinkL = (1.0-(0.01*shrink));
if (given("gmin"))
{
gminMod = gmin;
}
else
{
gminMod = getDeviceOptions().gmin;
}
if (given("pnjmaxi"))
{
imaxMod = pnjmaxi;
}
else
{
imaxMod = 1.0;
}
if (given("npn"))
{
VBICtype = 1.0;
}
else
{
if (given("pnp"))
{
VBICtype = (-1.0);
}
else
{
if (given("type"))
{
VBICtype = (-type);
}
}
}
{
double value_log_0 = log(maxexp);
VmaxExp = value_log_0;
}
Iikr = ((ikr>0.0)?(1.0/ikr):0.0);
Iikp = ((ikp>0.0)?(1.0/ikp):0.0);
Ihrcf = ((hrcf>0.0)?(1.0/hrcf):0.0);
Ivtf = ((vtf>0.0)?(1.0/vtf):0.0);
Iitf = ((itf>0.0)?(1.0/itf):0.0);
sltf = ((itf>0.0)?0.0:1.0);
tiniK = (273.15+tnom);
}
// End block initial_model


  return true;
}
//----------------------------------------------------------------------------
// Function      : Model::processInstanceParams
// Purpose       :
// Special Notes :
// Scope         : public
// Creator       :
// Creation Date :
//----------------------------------------------------------------------------
bool Model::processInstanceParams()
{

  std::vector<Instance*>::iterator iter;
  std::vector<Instance*>::iterator first = instanceContainer.begin();
  std::vector<Instance*>::iterator last  = instanceContainer.end();

  for (iter=first; iter!=last; ++iter)
  {
    (*iter)->processParams();
  }

  return true;
}

//-----------------------------------------------------------------------------
// Function      : Model::Model
// Purpose       : model block constructor
// Special Notes :
// Scope         : public
// Creator       :
// Creation Date :
//-----------------------------------------------------------------------------
Model::Model(
  const Configuration & configuration,
  const ModelBlock &    model_block,
  const FactoryBlock &  factory_block)
  : DeviceModel(model_block, configuration.getModelParameters(), factory_block),
    npn(0.0),
    pnp(0.0),
    type((-1)),
    VBICtype(1),
    scale(1.0),
    shrink(0.0),
    tmin((-100.0)),
    tmax(500.0),
    gmin(1.0e-12),
    pnjmaxi(1.0),
    maxexp(1.0e22),
    tnom(27.0),
    tminclip((-100.0)),
    tmaxclip(500.0),
    rcx(0.0),
    rci(0.0),
    vo(0.0),
    gamm(0.0),
    hrcf(0.0),
    rbx(0.0),
    rbi(0.0),
    re(0.0),
    rs(0.0),
    rbp(0.0),
    is(1.0e-16),
    isrr(1.0),
    nf(1.0),
    nr(1.0),
    qbm(0),
    isp(0.0),
    wsp(1.0),
    nfp(1.0),
    fc(0.9),
    cbeo(0.0),
    cje(0.0),
    pe(0.75),
    me(0.33),
    aje((-0.5)),
    cbco(0.0),
    cjc(0.0),
    pc(0.75),
    mc(0.33),
    ajc((-0.5)),
    vrt(0.0),
    art(0.1),
    qco(0.0),
    cjep(0.0),
    cjcp(0.0),
    ps(0.75),
    ms(0.33),
    ajs((-0.5)),
    ccso(0.0),
    ibei(1.0e-18),
    wbe(1.0),
    nei(1.0),
    qnibeir(0.0),
    iben(0.0),
    nen(2.0),
    ibci(1.0e-16),
    nci(1.0),
    ibcn(0.0),
    ncn(2.0),
    ibeip(0.0),
    ibenp(0.0),
    ibcip(0.0),
    ncip(1.0),
    ibcnp(0.0),
    ncnp(2.0),
    vef(0.0),
    ver(0.0),
    ikf(0.0),
    nkf(0.5),
    ikr(0.0),
    ikp(0.0),
    tf(0.0),
    qtf(0.0),
    xtf(0.0),
    vtf(0.0),
    itf(0.0),
    tr(0.0),
    td(0.0),
    avc1(0.0),
    avc2(0.0),
    avcx1(0.0),
    avcx2(0.0),
    mcx(0.33),
    vbbe(0.0),
    nbbe(1.0),
    ibbe(1.0e-06),
    tvbbe1(0.0),
    tvbbe2(0.0),
    tnbbe(0.0),
    vpte(0.0),
    ibk0(0.0),
    abk(1.0),
    bbk(0.0),
    kfn(0.0),
    afn(1.0),
    bfn(1.0),
    rth(0.0),
    cth(0.0),
    xre(0.0),
    xrb(0.0),
    xrbi(0.0),
    xrbx(0.0),
    xrc(0.0),
    xrci(0.0),
    xrcx(0.0),
    xrbp(0.0),
    xrs(0.0),
    xvo(0.0),
    ea(1.12),
    eaie(1.12),
    eaic(1.12),
    eais(1.12),
    eane(1.12),
    eanc(1.12),
    eans(1.12),
    eap(1.12),
    dear(0.0),
    xis(3.0),
    xii(3.0),
    xin(3.0),
    xisr(0.0),
    xikf(0.0),
    tavc(0.0),
    tavcx(0.0),
    tnf(0.0),
    tcvef(0.0),
    tcver(0.0),
    tcrth(0.0),
    tiniK(0.0),
    Iikr(0.0),
    Iikp(0.0),
    Ihrcf(0.0),
    Ivtf(0.0),
    Iitf(0.0),
    sltf(0.0),
    VmaxExp(0.0),
    gminMod(0.0),
    imaxMod(0.0)
{
  // Set params to constant default values (from parTable):
  setDefaultParams();

  // Set params according to .model line and constant defaults from metadata:
  setModParams(model_block.params);

  if (!given("XYCEADMSMODTEMP"))
    admsModTemp=getDeviceOptions().temp.getImmutableValue<double>();

  // Calculate any parameters specified as expressions:

  updateDependentParameters();

  // calculate dependent (ie computed) params and check for errors:
  processParams();
}

//-----------------------------------------------------------------------------
// Function      : Model::~Model
// Purpose       : destructor
// Special Notes :
// Scope         : public
// Creator       :
// Creation Date :
//-----------------------------------------------------------------------------
Model::~Model()
{
  std::vector<Instance*>::iterator iterI;
  std::vector<Instance*>::iterator firstI = instanceContainer.begin ();
  std::vector<Instance*>::iterator lastI  = instanceContainer.end ();

  // loop over instances:
  for (iterI = firstI; iterI != lastI; ++iterI)
  {
    delete (*iterI);
  }
}

//-----------------------------------------------------------------------------
// Function      : Model::printOutInstances
// Purpose       : debugging tool.
// Special Notes :
// Scope         : public
// Creator       :
// Creation Date :
//-----------------------------------------------------------------------------
std::ostream &Model::printOutInstances(std::ostream &os) const
{
  std::vector<Instance*>::const_iterator iter;
  std::vector<Instance*>::const_iterator first = instanceContainer.begin();
  std::vector<Instance*>::const_iterator last  = instanceContainer.end();

  int i;
  os << std::endl;
  os << "    name     model name  Parameters" << std::endl;
  for (i=0, iter=first; iter!=last; ++iter, ++i)
  {
    os << "  " << i << ": " << (*iter)->getName() << "      ";
    os << getName();

    os << std::endl;
      os << "M  =  " << (*iter)->m << std::endl;
      os << "TRISE  =  " << (*iter)->trise << std::endl;
      os << "SW_NOISE  =  " << (*iter)->sw_noise << std::endl;
      os << "SW_ET  =  " << (*iter)->sw_et << std::endl;
    os << std::endl;
  }

  os << std::endl;

  return os;
}

//-----------------------------------------------------------------------------
// Function      : Model::forEachInstance
// Purpose       :
// Special Notes :
// Scope         : public
// Creator       : David Baur
// Creation Date : 2/4/2014
//-----------------------------------------------------------------------------
/// Apply a device instance "op" to all instances associated with this
/// model
///
/// @param[in] op Operator to apply to all instances.
///
///
void Model::forEachInstance(DeviceInstanceOp &op) const
{
  for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
    op(*it);
}

Device *Traits::factory(const Configuration &configuration, const FactoryBlock &factory_block)
{
  return new DeviceMaster<Traits>(configuration, factory_block, factory_block.solverState_, factory_block.deviceOptions_);
}

void
registerDevice(const DeviceCountMap& deviceMap, const std::set<int>& levelSet)
{
if (deviceMap.empty() ||
((deviceMap.find("Q") != deviceMap.end() && (levelSet.find(12)!=levelSet.end()))))
{
BJT::registerDevice();

  Config<Traits>::addConfiguration()
    .registerDevice("q", 12)
    .registerModelType("npn", 12)
    .registerModelType("pnp", 12);
}
}


#ifdef Xyce_ADMS_SENSITIVITIES
//-----------------------------------------------------------------------------
// Function      : evaluateInitialInstance
// Purpose       : Evaluate the statements in the initial_instance block
// Special Notes : specific for sensitivity use
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
void evaluateInitialInstance(
instanceSensStruct & instanceStruct,
modelSensStruct & modelStruct,
 double admsTemperature, double adms_vt_nom, double ADMSgmin_arg, const Instance & theInstance)
{
//Begin block initial_instance
{
instanceStruct.d_instanceVar_mMod_dX = instanceStruct.d_instancePar_m_dX;
instanceStruct.instanceVar_mMod = instanceStruct.instancePar_m;
instanceStruct.d_instanceVar_tdevC_dX = instanceStruct.d_instancePar_trise_dX;
instanceStruct.instanceVar_tdevC = ((admsTemperature+instanceStruct.instancePar_trise)-273.15);
if ((instanceStruct.instanceVar_tdevC<modelStruct.modelPar_tmin))
{
UserInfo(theInstance)  << "WARNING: ambient temperature is lower than allowed minimum" << " " <<  std::endl; 
}
if ((instanceStruct.instanceVar_tdevC>modelStruct.modelPar_tmax))
{
UserInfo(theInstance)  << "WARNING: ambient temperature is higher than allowed maximum" << " " <<  std::endl; 
}
if ((instanceStruct.instanceVar_tdevC<(modelStruct.modelPar_tminclip+1.0)))
{
{
double value_exp_0 = exp(((instanceStruct.instanceVar_tdevC-modelStruct.modelPar_tminclip)-1.0));
double  deriv_exp_0_d0 = value_exp_0;
instanceStruct.d_instanceVar_tdevC_dX = (modelStruct.d_modelPar_tminclip_dX+deriv_exp_0_d0*((instanceStruct.d_instanceVar_tdevC_dX-modelStruct.d_modelPar_tminclip_dX)));
instanceStruct.instanceVar_tdevC = (modelStruct.modelPar_tminclip+value_exp_0);
}
}
else
{
if ((instanceStruct.instanceVar_tdevC>(modelStruct.modelPar_tmaxclip-1.0)))
{
{
double value_exp_0 = exp(((modelStruct.modelPar_tmaxclip-instanceStruct.instanceVar_tdevC)-1.0));
double  deriv_exp_0_d0 = value_exp_0;
instanceStruct.d_instanceVar_tdevC_dX = (modelStruct.d_modelPar_tmaxclip_dX-deriv_exp_0_d0*((modelStruct.d_modelPar_tmaxclip_dX-instanceStruct.d_instanceVar_tdevC_dX)));
instanceStruct.instanceVar_tdevC = (modelStruct.modelPar_tmaxclip-value_exp_0);
}
}
else
{
}
}
instanceStruct.d_instanceVar_tdevK_dX = instanceStruct.d_instanceVar_tdevC_dX;
instanceStruct.instanceVar_tdevK = (instanceStruct.instanceVar_tdevC+273.15);
instanceStruct.d_instanceVar_vtv_dX = (1.380662e-23*instanceStruct.d_instanceVar_tdevK_dX/1.602189e-19);
instanceStruct.instanceVar_vtv = ((1.380662e-23*instanceStruct.instanceVar_tdevK)/1.602189e-19);
instanceStruct.d_instanceVar_rT_dX = ((modelStruct.modelVar_tiniK*instanceStruct.d_instanceVar_tdevK_dX-instanceStruct.instanceVar_tdevK*modelStruct.d_modelVar_tiniK_dX)/modelStruct.modelVar_tiniK/modelStruct.modelVar_tiniK);
instanceStruct.instanceVar_rT = (instanceStruct.instanceVar_tdevK/modelStruct.modelVar_tiniK);
{
double value_log_0 = log((adms_vt(admsTemperature)/(1.41421356237309504880*modelStruct.modelPar_is)));
double  deriv_log_0_d0 = (1.0/(adms_vt(admsTemperature)/(1.41421356237309504880*modelStruct.modelPar_is)));
instanceStruct.d_instanceVar_tVCrit_dX = adms_vt(admsTemperature)*deriv_log_0_d0*((-adms_vt(admsTemperature)*1.41421356237309504880*modelStruct.d_modelPar_is_dX/(1.41421356237309504880*modelStruct.modelPar_is)/(1.41421356237309504880*modelStruct.modelPar_is)));
instanceStruct.instanceVar_tVCrit = (adms_vt(admsTemperature)*value_log_0);
}
if ((modelStruct.modelPar_ibbe>0.0))
{
{
double value_exp_0 = exp(((-modelStruct.modelPar_vbbe)/(modelStruct.modelPar_nbbe*instanceStruct.instanceVar_vtv)));
double value_log_1 = log((value_exp_0+(modelStruct.modelVar_imaxMod/modelStruct.modelPar_ibbe)));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_log_1_d0 = (1.0/(value_exp_0+(modelStruct.modelVar_imaxMod/modelStruct.modelPar_ibbe)));
instanceStruct.d_instanceVar_maxvIbbe_dX = ((modelStruct.modelPar_nbbe*instanceStruct.instanceVar_vtv)*deriv_log_1_d0*((deriv_exp_0_d0*((((modelStruct.modelPar_nbbe*instanceStruct.instanceVar_vtv)*(-modelStruct.d_modelPar_vbbe_dX)-(-modelStruct.modelPar_vbbe)*(modelStruct.modelPar_nbbe*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nbbe_dX*instanceStruct.instanceVar_vtv))/(modelStruct.modelPar_nbbe*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nbbe*instanceStruct.instanceVar_vtv)))+((modelStruct.modelPar_ibbe*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*modelStruct.d_modelPar_ibbe_dX)/modelStruct.modelPar_ibbe/modelStruct.modelPar_ibbe)))+(modelStruct.modelPar_nbbe*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nbbe_dX*instanceStruct.instanceVar_vtv)*value_log_1);
instanceStruct.instanceVar_maxvIbbe = ((modelStruct.modelPar_nbbe*instanceStruct.instanceVar_vtv)*value_log_1);
}
}
else
{
instanceStruct.d_instanceVar_maxvIbbe_dX = 0.0;
instanceStruct.instanceVar_maxvIbbe = 0.0;
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xis/modelStruct.modelPar_nf));
double value_exp_1 = exp((((-modelStruct.modelPar_ea)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nf)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xis/modelStruct.modelPar_nf)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_is_t_dX = ((modelStruct.modelPar_is*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nf)*((-modelStruct.modelPar_ea)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_ea_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_ea)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nf_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nf))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nf)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nf)))+(modelStruct.modelPar_is*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nf*modelStruct.d_modelPar_xis_dX-modelStruct.modelPar_xis*modelStruct.d_modelPar_nf_dX)/modelStruct.modelPar_nf/modelStruct.modelPar_nf))))+modelStruct.d_modelPar_is_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_is_t = ((modelStruct.modelPar_is*value_pow_0)*value_exp_1);
}
if ((instanceStruct.instanceVar_is_t>0.0))
{
if (((modelStruct.modelPar_ikf>0.0)&&(modelStruct.modelVar_imaxMod>modelStruct.modelPar_ikf)))
{
{
double value_pow_0 = pow((4.0/modelStruct.modelPar_ikf),modelStruct.modelPar_nkf);
double value_pow_1 = pow(((0.5*modelStruct.modelVar_imaxMod)*value_pow_0),(1.0/(1.0-modelStruct.modelPar_nkf)));
double value_log_2 = log((1.0+(value_pow_1/instanceStruct.instanceVar_is_t)));
double  deriv_pow_0_d0 = (((4.0/modelStruct.modelPar_ikf) == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_nkf/(4.0/modelStruct.modelPar_ikf)));
double  deriv_pow_0_d1 = ((4.0/modelStruct.modelPar_ikf) == 0.0)?0.0:(log((4.0/modelStruct.modelPar_ikf))*value_pow_0);
double  deriv_pow_1_d0 = ((((0.5*modelStruct.modelVar_imaxMod)*value_pow_0) == 0.0)?0.0:(value_pow_1*(1.0/(1.0-modelStruct.modelPar_nkf))/((0.5*modelStruct.modelVar_imaxMod)*value_pow_0)));
double  deriv_pow_1_d1 = (((0.5*modelStruct.modelVar_imaxMod)*value_pow_0) == 0.0)?0.0:(log(((0.5*modelStruct.modelVar_imaxMod)*value_pow_0))*value_pow_1);
double  deriv_log_2_d0 = (1.0/(1.0+(value_pow_1/instanceStruct.instanceVar_is_t)));
instanceStruct.d_instanceVar_maxvIfi_dX = ((modelStruct.modelPar_nf*instanceStruct.instanceVar_vtv)*deriv_log_2_d0*(((instanceStruct.instanceVar_is_t*((deriv_pow_1_d0*(((0.5*modelStruct.modelVar_imaxMod)*((deriv_pow_0_d0*((-4.0*modelStruct.d_modelPar_ikf_dX/modelStruct.modelPar_ikf/modelStruct.modelPar_ikf)))+(deriv_pow_0_d1*(modelStruct.d_modelPar_nkf_dX)))+0.5*modelStruct.d_modelVar_imaxMod_dX*value_pow_0)))+(deriv_pow_1_d1*((-(-modelStruct.d_modelPar_nkf_dX)/(1.0-modelStruct.modelPar_nkf)/(1.0-modelStruct.modelPar_nkf)))))-value_pow_1*instanceStruct.d_instanceVar_is_t_dX)/instanceStruct.instanceVar_is_t/instanceStruct.instanceVar_is_t))+(modelStruct.modelPar_nf*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nf_dX*instanceStruct.instanceVar_vtv)*value_log_2);
instanceStruct.instanceVar_maxvIfi = ((modelStruct.modelPar_nf*instanceStruct.instanceVar_vtv)*value_log_2);
}
}
else
{
{
double value_log_0 = log((1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_is_t)));
double  deriv_log_0_d0 = (1.0/(1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_is_t)));
instanceStruct.d_instanceVar_maxvIfi_dX = ((modelStruct.modelPar_nf*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(((instanceStruct.instanceVar_is_t*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*instanceStruct.d_instanceVar_is_t_dX)/instanceStruct.instanceVar_is_t/instanceStruct.instanceVar_is_t))+(modelStruct.modelPar_nf*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nf_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIfi = ((modelStruct.modelPar_nf*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
}
else
{
instanceStruct.d_instanceVar_maxvIfi_dX = 0.0;
instanceStruct.instanceVar_maxvIfi = 0.0;
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xisr/modelStruct.modelPar_nr));
double value_exp_1 = exp((((-modelStruct.modelPar_dear)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nr)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xisr/modelStruct.modelPar_nr)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_isrr_t_dX = ((modelStruct.modelPar_isrr*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nr)*((-modelStruct.modelPar_dear)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_dear_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_dear)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nr_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nr))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nr)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nr)))+(modelStruct.modelPar_isrr*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nr*modelStruct.d_modelPar_xisr_dX-modelStruct.modelPar_xisr*modelStruct.d_modelPar_nr_dX)/modelStruct.modelPar_nr/modelStruct.modelPar_nr))))+modelStruct.d_modelPar_isrr_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_isrr_t = ((modelStruct.modelPar_isrr*value_pow_0)*value_exp_1);
}
if (((instanceStruct.instanceVar_is_t>0.0)&&(instanceStruct.instanceVar_isrr_t>0.0)))
{
if (((modelStruct.modelPar_ikr>0.0)&&(modelStruct.modelVar_imaxMod>modelStruct.modelPar_ikr)))
{
{
double value_pow_0 = pow((4.0/modelStruct.modelPar_ikr),modelStruct.modelPar_nkf);
double value_pow_1 = pow(((0.5*modelStruct.modelVar_imaxMod)*value_pow_0),(1.0/(1.0-modelStruct.modelPar_nkf)));
double value_log_2 = log((1.0+(value_pow_1/(instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t))));
double  deriv_pow_0_d0 = (((4.0/modelStruct.modelPar_ikr) == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_nkf/(4.0/modelStruct.modelPar_ikr)));
double  deriv_pow_0_d1 = ((4.0/modelStruct.modelPar_ikr) == 0.0)?0.0:(log((4.0/modelStruct.modelPar_ikr))*value_pow_0);
double  deriv_pow_1_d0 = ((((0.5*modelStruct.modelVar_imaxMod)*value_pow_0) == 0.0)?0.0:(value_pow_1*(1.0/(1.0-modelStruct.modelPar_nkf))/((0.5*modelStruct.modelVar_imaxMod)*value_pow_0)));
double  deriv_pow_1_d1 = (((0.5*modelStruct.modelVar_imaxMod)*value_pow_0) == 0.0)?0.0:(log(((0.5*modelStruct.modelVar_imaxMod)*value_pow_0))*value_pow_1);
double  deriv_log_2_d0 = (1.0/(1.0+(value_pow_1/(instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t))));
instanceStruct.d_instanceVar_maxvIri_dX = ((modelStruct.modelPar_nr*instanceStruct.instanceVar_vtv)*deriv_log_2_d0*((((instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t)*((deriv_pow_1_d0*(((0.5*modelStruct.modelVar_imaxMod)*((deriv_pow_0_d0*((-4.0*modelStruct.d_modelPar_ikr_dX/modelStruct.modelPar_ikr/modelStruct.modelPar_ikr)))+(deriv_pow_0_d1*(modelStruct.d_modelPar_nkf_dX)))+0.5*modelStruct.d_modelVar_imaxMod_dX*value_pow_0)))+(deriv_pow_1_d1*((-(-modelStruct.d_modelPar_nkf_dX)/(1.0-modelStruct.modelPar_nkf)/(1.0-modelStruct.modelPar_nkf)))))-value_pow_1*(instanceStruct.instanceVar_is_t*instanceStruct.d_instanceVar_isrr_t_dX+instanceStruct.d_instanceVar_is_t_dX*instanceStruct.instanceVar_isrr_t))/(instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t)/(instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t)))+(modelStruct.modelPar_nr*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nr_dX*instanceStruct.instanceVar_vtv)*value_log_2);
instanceStruct.instanceVar_maxvIri = ((modelStruct.modelPar_nr*instanceStruct.instanceVar_vtv)*value_log_2);
}
}
else
{
{
double value_log_0 = log((1.0+(modelStruct.modelVar_imaxMod/(instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t))));
double  deriv_log_0_d0 = (1.0/(1.0+(modelStruct.modelVar_imaxMod/(instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t))));
instanceStruct.d_instanceVar_maxvIri_dX = ((modelStruct.modelPar_nr*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*((((instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t)*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*(instanceStruct.instanceVar_is_t*instanceStruct.d_instanceVar_isrr_t_dX+instanceStruct.d_instanceVar_is_t_dX*instanceStruct.instanceVar_isrr_t))/(instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t)/(instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t)))+(modelStruct.modelPar_nr*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nr_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIri = ((modelStruct.modelPar_nr*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
}
else
{
instanceStruct.d_instanceVar_maxvIri_dX = 0.0;
instanceStruct.instanceVar_maxvIri = 0.0;
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xis/modelStruct.modelPar_nfp));
double value_exp_1 = exp((((-modelStruct.modelPar_eap)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nfp)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xis/modelStruct.modelPar_nfp)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_isp_t_dX = ((modelStruct.modelPar_isp*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nfp)*((-modelStruct.modelPar_eap)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eap_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eap)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nfp_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nfp))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nfp)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nfp)))+(modelStruct.modelPar_isp*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nfp*modelStruct.d_modelPar_xis_dX-modelStruct.modelPar_xis*modelStruct.d_modelPar_nfp_dX)/modelStruct.modelPar_nfp/modelStruct.modelPar_nfp))))+modelStruct.d_modelPar_isp_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_isp_t = ((modelStruct.modelPar_isp*value_pow_0)*value_exp_1);
}
if ((instanceStruct.instanceVar_isp_t>0.0))
{
if (((modelStruct.modelPar_ikp>0.0)&&(modelStruct.modelVar_imaxMod>modelStruct.modelPar_ikp)))
{
{
double value_log_0 = log((1.0+(((modelStruct.modelVar_imaxMod*modelStruct.modelVar_imaxMod)*modelStruct.modelVar_Iikp)/instanceStruct.instanceVar_isp_t)));
double  deriv_log_0_d0 = (1.0/(1.0+(((modelStruct.modelVar_imaxMod*modelStruct.modelVar_imaxMod)*modelStruct.modelVar_Iikp)/instanceStruct.instanceVar_isp_t)));
instanceStruct.d_instanceVar_maxvIp_dX = ((modelStruct.modelPar_nfp*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(((instanceStruct.instanceVar_isp_t*((modelStruct.modelVar_imaxMod*modelStruct.modelVar_imaxMod)*modelStruct.d_modelVar_Iikp_dX+(modelStruct.modelVar_imaxMod*modelStruct.d_modelVar_imaxMod_dX+modelStruct.d_modelVar_imaxMod_dX*modelStruct.modelVar_imaxMod)*modelStruct.modelVar_Iikp)-((modelStruct.modelVar_imaxMod*modelStruct.modelVar_imaxMod)*modelStruct.modelVar_Iikp)*instanceStruct.d_instanceVar_isp_t_dX)/instanceStruct.instanceVar_isp_t/instanceStruct.instanceVar_isp_t))+(modelStruct.modelPar_nfp*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nfp_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIp = ((modelStruct.modelPar_nfp*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
else
{
{
double value_log_0 = log((1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_isp_t)));
double  deriv_log_0_d0 = (1.0/(1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_isp_t)));
instanceStruct.d_instanceVar_maxvIp_dX = ((modelStruct.modelPar_nfp*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(((instanceStruct.instanceVar_isp_t*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*instanceStruct.d_instanceVar_isp_t_dX)/instanceStruct.instanceVar_isp_t/instanceStruct.instanceVar_isp_t))+(modelStruct.modelPar_nfp*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nfp_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIp = ((modelStruct.modelPar_nfp*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
}
else
{
instanceStruct.d_instanceVar_maxvIp_dX = 0.0;
instanceStruct.instanceVar_maxvIp = 0.0;
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xii/modelStruct.modelPar_nei));
double value_exp_1 = exp((((-modelStruct.modelPar_eaie)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nei)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xii/modelStruct.modelPar_nei)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibei_t_dX = ((modelStruct.modelPar_ibei*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nei)*((-modelStruct.modelPar_eaie)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eaie_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eaie)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nei_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nei))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nei)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nei)))+(modelStruct.modelPar_ibei*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nei*modelStruct.d_modelPar_xii_dX-modelStruct.modelPar_xii*modelStruct.d_modelPar_nei_dX)/modelStruct.modelPar_nei/modelStruct.modelPar_nei))))+modelStruct.d_modelPar_ibei_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibei_t = ((modelStruct.modelPar_ibei*value_pow_0)*value_exp_1);
}
if ((instanceStruct.instanceVar_ibei_t>0.0))
{
{
double value_log_0 = log((1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibei_t)));
double  deriv_log_0_d0 = (1.0/(1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibei_t)));
instanceStruct.d_instanceVar_maxvIbei_dX = ((modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(((instanceStruct.instanceVar_ibei_t*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*instanceStruct.d_instanceVar_ibei_t_dX)/instanceStruct.instanceVar_ibei_t/instanceStruct.instanceVar_ibei_t))+(modelStruct.modelPar_nei*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nei_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIbei = ((modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
else
{
instanceStruct.d_instanceVar_maxvIbei_dX = 0.0;
instanceStruct.instanceVar_maxvIbei = 0.0;
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xin/modelStruct.modelPar_nen));
double value_exp_1 = exp((((-modelStruct.modelPar_eane)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nen)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xin/modelStruct.modelPar_nen)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_iben_t_dX = ((modelStruct.modelPar_iben*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nen)*((-modelStruct.modelPar_eane)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eane_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eane)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nen_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nen))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nen)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nen)))+(modelStruct.modelPar_iben*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nen*modelStruct.d_modelPar_xin_dX-modelStruct.modelPar_xin*modelStruct.d_modelPar_nen_dX)/modelStruct.modelPar_nen/modelStruct.modelPar_nen))))+modelStruct.d_modelPar_iben_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_iben_t = ((modelStruct.modelPar_iben*value_pow_0)*value_exp_1);
}
if ((instanceStruct.instanceVar_iben_t>0.0))
{
{
double value_log_0 = log((1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_iben_t)));
double  deriv_log_0_d0 = (1.0/(1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_iben_t)));
instanceStruct.d_instanceVar_maxvIben_dX = ((modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(((instanceStruct.instanceVar_iben_t*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*instanceStruct.d_instanceVar_iben_t_dX)/instanceStruct.instanceVar_iben_t/instanceStruct.instanceVar_iben_t))+(modelStruct.modelPar_nen*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nen_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIben = ((modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
else
{
instanceStruct.d_instanceVar_maxvIben_dX = 0.0;
instanceStruct.instanceVar_maxvIben = 0.0;
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xii/modelStruct.modelPar_nci));
double value_exp_1 = exp((((-modelStruct.modelPar_eaic)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xii/modelStruct.modelPar_nci)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibci_t_dX = ((modelStruct.modelPar_ibci*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)*((-modelStruct.modelPar_eaic)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eaic_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eaic)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nci_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nci))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)))+(modelStruct.modelPar_ibci*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nci*modelStruct.d_modelPar_xii_dX-modelStruct.modelPar_xii*modelStruct.d_modelPar_nci_dX)/modelStruct.modelPar_nci/modelStruct.modelPar_nci))))+modelStruct.d_modelPar_ibci_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibci_t = ((modelStruct.modelPar_ibci*value_pow_0)*value_exp_1);
}
if ((instanceStruct.instanceVar_ibci_t>0.0))
{
{
double value_log_0 = log((1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibci_t)));
double  deriv_log_0_d0 = (1.0/(1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibci_t)));
instanceStruct.d_instanceVar_maxvIbci_dX = ((modelStruct.modelPar_nci*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(((instanceStruct.instanceVar_ibci_t*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*instanceStruct.d_instanceVar_ibci_t_dX)/instanceStruct.instanceVar_ibci_t/instanceStruct.instanceVar_ibci_t))+(modelStruct.modelPar_nci*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nci_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIbci = ((modelStruct.modelPar_nci*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
else
{
instanceStruct.d_instanceVar_maxvIbci_dX = 0.0;
instanceStruct.instanceVar_maxvIbci = 0.0;
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xin/modelStruct.modelPar_ncn));
double value_exp_1 = exp((((-modelStruct.modelPar_eanc)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xin/modelStruct.modelPar_ncn)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibcn_t_dX = ((modelStruct.modelPar_ibcn*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)*((-modelStruct.modelPar_eanc)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eanc_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eanc)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_ncn_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_ncn))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)))+(modelStruct.modelPar_ibcn*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_ncn*modelStruct.d_modelPar_xin_dX-modelStruct.modelPar_xin*modelStruct.d_modelPar_ncn_dX)/modelStruct.modelPar_ncn/modelStruct.modelPar_ncn))))+modelStruct.d_modelPar_ibcn_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibcn_t = ((modelStruct.modelPar_ibcn*value_pow_0)*value_exp_1);
}
if ((instanceStruct.instanceVar_ibcn_t>0.0))
{
{
double value_log_0 = log((1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibcn_t)));
double  deriv_log_0_d0 = (1.0/(1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibcn_t)));
instanceStruct.d_instanceVar_maxvIbcn_dX = ((modelStruct.modelPar_ncn*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(((instanceStruct.instanceVar_ibcn_t*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*instanceStruct.d_instanceVar_ibcn_t_dX)/instanceStruct.instanceVar_ibcn_t/instanceStruct.instanceVar_ibcn_t))+(modelStruct.modelPar_ncn*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_ncn_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIbcn = ((modelStruct.modelPar_ncn*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
else
{
instanceStruct.d_instanceVar_maxvIbcn_dX = 0.0;
instanceStruct.instanceVar_maxvIbcn = 0.0;
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xii/modelStruct.modelPar_nci));
double value_exp_1 = exp((((-modelStruct.modelPar_eaic)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xii/modelStruct.modelPar_nci)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibeip_t_dX = ((modelStruct.modelPar_ibeip*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)*((-modelStruct.modelPar_eaic)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eaic_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eaic)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nci_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nci))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)))+(modelStruct.modelPar_ibeip*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nci*modelStruct.d_modelPar_xii_dX-modelStruct.modelPar_xii*modelStruct.d_modelPar_nci_dX)/modelStruct.modelPar_nci/modelStruct.modelPar_nci))))+modelStruct.d_modelPar_ibeip_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibeip_t = ((modelStruct.modelPar_ibeip*value_pow_0)*value_exp_1);
}
if ((instanceStruct.instanceVar_ibeip_t>0.0))
{
{
double value_log_0 = log((1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibeip_t)));
double  deriv_log_0_d0 = (1.0/(1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibeip_t)));
instanceStruct.d_instanceVar_maxvIbeip_dX = ((modelStruct.modelPar_nci*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(((instanceStruct.instanceVar_ibeip_t*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*instanceStruct.d_instanceVar_ibeip_t_dX)/instanceStruct.instanceVar_ibeip_t/instanceStruct.instanceVar_ibeip_t))+(modelStruct.modelPar_nci*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nci_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIbeip = ((modelStruct.modelPar_nci*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
else
{
instanceStruct.d_instanceVar_maxvIbeip_dX = 0.0;
instanceStruct.instanceVar_maxvIbeip = 0.0;
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xin/modelStruct.modelPar_ncn));
double value_exp_1 = exp((((-modelStruct.modelPar_eanc)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xin/modelStruct.modelPar_ncn)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibenp_t_dX = ((modelStruct.modelPar_ibenp*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)*((-modelStruct.modelPar_eanc)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eanc_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eanc)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_ncn_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_ncn))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)))+(modelStruct.modelPar_ibenp*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_ncn*modelStruct.d_modelPar_xin_dX-modelStruct.modelPar_xin*modelStruct.d_modelPar_ncn_dX)/modelStruct.modelPar_ncn/modelStruct.modelPar_ncn))))+modelStruct.d_modelPar_ibenp_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibenp_t = ((modelStruct.modelPar_ibenp*value_pow_0)*value_exp_1);
}
if ((instanceStruct.instanceVar_ibenp_t>0.0))
{
{
double value_log_0 = log((1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibenp_t)));
double  deriv_log_0_d0 = (1.0/(1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibenp_t)));
instanceStruct.d_instanceVar_maxvIbenp_dX = ((modelStruct.modelPar_ncn*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(((instanceStruct.instanceVar_ibenp_t*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*instanceStruct.d_instanceVar_ibenp_t_dX)/instanceStruct.instanceVar_ibenp_t/instanceStruct.instanceVar_ibenp_t))+(modelStruct.modelPar_ncn*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_ncn_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIbenp = ((modelStruct.modelPar_ncn*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
else
{
instanceStruct.d_instanceVar_maxvIbenp_dX = 0.0;
instanceStruct.instanceVar_maxvIbenp = 0.0;
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xii/modelStruct.modelPar_ncip));
double value_exp_1 = exp((((-modelStruct.modelPar_eais)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncip)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xii/modelStruct.modelPar_ncip)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibcip_t_dX = ((modelStruct.modelPar_ibcip*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncip)*((-modelStruct.modelPar_eais)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eais_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eais)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_ncip_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_ncip))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncip)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncip)))+(modelStruct.modelPar_ibcip*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_ncip*modelStruct.d_modelPar_xii_dX-modelStruct.modelPar_xii*modelStruct.d_modelPar_ncip_dX)/modelStruct.modelPar_ncip/modelStruct.modelPar_ncip))))+modelStruct.d_modelPar_ibcip_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibcip_t = ((modelStruct.modelPar_ibcip*value_pow_0)*value_exp_1);
}
if ((instanceStruct.instanceVar_ibcip_t>0.0))
{
{
double value_log_0 = log((1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibcip_t)));
double  deriv_log_0_d0 = (1.0/(1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibcip_t)));
instanceStruct.d_instanceVar_maxvIbcip_dX = ((modelStruct.modelPar_ncip*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(((instanceStruct.instanceVar_ibcip_t*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*instanceStruct.d_instanceVar_ibcip_t_dX)/instanceStruct.instanceVar_ibcip_t/instanceStruct.instanceVar_ibcip_t))+(modelStruct.modelPar_ncip*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_ncip_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIbcip = ((modelStruct.modelPar_ncip*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
else
{
instanceStruct.d_instanceVar_maxvIbcip_dX = 0.0;
instanceStruct.instanceVar_maxvIbcip = 0.0;
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xin/modelStruct.modelPar_ncnp));
double value_exp_1 = exp((((-modelStruct.modelPar_eans)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncnp)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xin/modelStruct.modelPar_ncnp)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibcnp_t_dX = ((modelStruct.modelPar_ibcnp*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncnp)*((-modelStruct.modelPar_eans)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eans_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eans)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_ncnp_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_ncnp))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncnp)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncnp)))+(modelStruct.modelPar_ibcnp*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_ncnp*modelStruct.d_modelPar_xin_dX-modelStruct.modelPar_xin*modelStruct.d_modelPar_ncnp_dX)/modelStruct.modelPar_ncnp/modelStruct.modelPar_ncnp))))+modelStruct.d_modelPar_ibcnp_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibcnp_t = ((modelStruct.modelPar_ibcnp*value_pow_0)*value_exp_1);
}
if ((instanceStruct.instanceVar_ibcnp_t>0.0))
{
{
double value_log_0 = log((1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibcnp_t)));
double  deriv_log_0_d0 = (1.0/(1.0+(modelStruct.modelVar_imaxMod/instanceStruct.instanceVar_ibcnp_t)));
instanceStruct.d_instanceVar_maxvIbcnp_dX = ((modelStruct.modelPar_ncnp*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(((instanceStruct.instanceVar_ibcnp_t*modelStruct.d_modelVar_imaxMod_dX-modelStruct.modelVar_imaxMod*instanceStruct.d_instanceVar_ibcnp_t_dX)/instanceStruct.instanceVar_ibcnp_t/instanceStruct.instanceVar_ibcnp_t))+(modelStruct.modelPar_ncnp*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_ncnp_dX*instanceStruct.instanceVar_vtv)*value_log_0);
instanceStruct.instanceVar_maxvIbcnp = ((modelStruct.modelPar_ncnp*instanceStruct.instanceVar_vtv)*value_log_0);
}
}
else
{
instanceStruct.d_instanceVar_maxvIbcnp_dX = 0.0;
instanceStruct.instanceVar_maxvIbcnp = 0.0;
}
}
// End block initial_instance
}



//-----------------------------------------------------------------------------
// Function      : evaluateInitialModel
// Purpose       : Evaluate the statements in the initial_model block
// Special Notes : specific for sensitivity use
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
void evaluateInitialModel(
modelSensStruct & modelStruct,
 double admsTemperature, double ADMSgmin_arg, const Instance & theInstance)
{
  double shrinkL=0.0;
double d_shrinkL_dX=0.0;
  double scaleFac=0.0;
double d_scaleFac_dX=0.0;
//Begin block initial_model
{
d_scaleFac_dX = modelStruct.d_modelPar_scale_dX;
scaleFac = modelStruct.modelPar_scale;
d_shrinkL_dX = (-0.01*modelStruct.d_modelPar_shrink_dX);
shrinkL = (1.0-(0.01*modelStruct.modelPar_shrink));
if (modelStruct.modelPar_given_gmin)
{
modelStruct.d_modelVar_gminMod_dX = modelStruct.d_modelPar_gmin_dX;
modelStruct.modelVar_gminMod = modelStruct.modelPar_gmin;
}
else
{
modelStruct.d_modelVar_gminMod_dX = 0.0;
modelStruct.modelVar_gminMod = ADMSgmin_arg;
}
if (modelStruct.modelPar_given_pnjmaxi)
{
modelStruct.d_modelVar_imaxMod_dX = modelStruct.d_modelPar_pnjmaxi_dX;
modelStruct.modelVar_imaxMod = modelStruct.modelPar_pnjmaxi;
}
else
{
modelStruct.d_modelVar_imaxMod_dX = 0.0;
modelStruct.modelVar_imaxMod = 1.0;
}
if (modelStruct.modelPar_given_npn)
{
modelStruct.modelPar_VBICtype = 1.0;
}
else
{
if (modelStruct.modelPar_given_pnp)
{
modelStruct.modelPar_VBICtype = (-1.0);
}
else
{
if (modelStruct.modelPar_given_type)
{
modelStruct.modelPar_VBICtype = (-modelStruct.modelPar_type);
}
}
}
{
double value_log_0 = log(modelStruct.modelPar_maxexp);
double  deriv_log_0_d0 = (1.0/modelStruct.modelPar_maxexp);
modelStruct.d_modelVar_VmaxExp_dX = deriv_log_0_d0*(modelStruct.d_modelPar_maxexp_dX);
modelStruct.modelVar_VmaxExp = value_log_0;
}
modelStruct.d_modelVar_Iikr_dX = ((modelStruct.modelPar_ikr>0.0)?(-modelStruct.d_modelPar_ikr_dX/modelStruct.modelPar_ikr/modelStruct.modelPar_ikr):0.0);
modelStruct.modelVar_Iikr = ((modelStruct.modelPar_ikr>0.0)?(1.0/modelStruct.modelPar_ikr):0.0);
modelStruct.d_modelVar_Iikp_dX = ((modelStruct.modelPar_ikp>0.0)?(-modelStruct.d_modelPar_ikp_dX/modelStruct.modelPar_ikp/modelStruct.modelPar_ikp):0.0);
modelStruct.modelVar_Iikp = ((modelStruct.modelPar_ikp>0.0)?(1.0/modelStruct.modelPar_ikp):0.0);
modelStruct.d_modelVar_Ihrcf_dX = ((modelStruct.modelPar_hrcf>0.0)?(-modelStruct.d_modelPar_hrcf_dX/modelStruct.modelPar_hrcf/modelStruct.modelPar_hrcf):0.0);
modelStruct.modelVar_Ihrcf = ((modelStruct.modelPar_hrcf>0.0)?(1.0/modelStruct.modelPar_hrcf):0.0);
modelStruct.d_modelVar_Ivtf_dX = ((modelStruct.modelPar_vtf>0.0)?(-modelStruct.d_modelPar_vtf_dX/modelStruct.modelPar_vtf/modelStruct.modelPar_vtf):0.0);
modelStruct.modelVar_Ivtf = ((modelStruct.modelPar_vtf>0.0)?(1.0/modelStruct.modelPar_vtf):0.0);
modelStruct.d_modelVar_Iitf_dX = ((modelStruct.modelPar_itf>0.0)?(-modelStruct.d_modelPar_itf_dX/modelStruct.modelPar_itf/modelStruct.modelPar_itf):0.0);
modelStruct.modelVar_Iitf = ((modelStruct.modelPar_itf>0.0)?(1.0/modelStruct.modelPar_itf):0.0);
modelStruct.d_modelVar_sltf_dX = 0.0;
modelStruct.modelVar_sltf = ((modelStruct.modelPar_itf>0.0)?0.0:1.0);
modelStruct.d_modelVar_tiniK_dX = modelStruct.d_modelPar_tnom_dX;
modelStruct.modelVar_tiniK = (273.15+modelStruct.modelPar_tnom);
}
// End block initial_model
}



//-----------------------------------------------------------------------------
// Function      : evaluateModelEquations
// Purpose       : Evaluate the main module block.  Similar to
//                 updateIntermediateVars, but takes all instance and model
//                 parameters and variables as arguments instead of using
//                 the ones stored in the objects.
// Special Notes : specific for sensitivity use
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
void evaluateModelEquations(
std::vector <double> & probeVars,
// probe constants
const int admsProbeID_V_xf2_GND,
const int admsProbeID_V_xf1_GND,
const int admsProbeID_V_s_si,
const int admsProbeID_V_bx_si,
const int admsProbeID_V_si_bp,
const int admsProbeID_V_bp_cx,
const int admsProbeID_V_e_ei,
const int admsProbeID_V_bx_bi,
const int admsProbeID_V_b_bx,
const int admsProbeID_V_cx_ci,
const int admsProbeID_V_c_cx,
const int admsProbeID_V_b_c,
const int admsProbeID_V_b_e,
const int admsProbeID_V_bx_bp,
const int admsProbeID_V_ci_ei,
const int admsProbeID_V_bx_cx,
const int admsProbeID_V_bi_cx,
const int admsProbeID_V_bi_ci,
const int admsProbeID_V_bx_ei,
const int admsProbeID_V_bi_ei,
const int admsProbeID_Temp_dt_GND,
// node constants
const int admsNodeID_c,
const int admsNodeID_b,
const int admsNodeID_e,
const int admsNodeID_s,
const int admsNodeID_dt,
const int admsNodeID_cx,
const int admsNodeID_ci,
const int admsNodeID_bx,
const int admsNodeID_bi,
const int admsNodeID_ei,
const int admsNodeID_bp,
const int admsNodeID_si,
const int admsNodeID_xf1,
const int admsNodeID_xf2,
instanceSensStruct & instanceStruct,
modelSensStruct & modelStruct,
// basic variables
 double admsTemperature, double adms_vt_nom, double ADMSgmin_arg, std::vector <double> & d_staticContributions_dX, std::vector <double> & d_dynamicContributions_dX, const Instance & theInstance)
{

  // Local variables
  double qdbcp=0.0;
double d_qdbcp_dX=0.0;
  double qdbex=0.0;
double d_qdbex_dX=0.0;
  double qdbep=0.0;
double d_qdbep_dX=0.0;
  double sgIf=0.0;
double d_sgIf_dX=0.0;
  double rIf=0.0;
double d_rIf_dX=0.0;
  double mIf=0.0;
double d_mIf_dX=0.0;
  double tff=0.0;
double d_tff_dX=0.0;
  double Qbe=0.0;
double d_Qbe_dX=0.0;
  double Qbex=0.0;
double d_Qbex_dX=0.0;
  double Qbc=0.0;
double d_Qbc_dX=0.0;
  double Qbcx=0.0;
double d_Qbcx_dX=0.0;
  double Qbep=0.0;
double d_Qbep_dX=0.0;
  double Qbcp=0.0;
double d_Qbcp_dX=0.0;
  double Qbeo=0.0;
double d_Qbeo_dX=0.0;
  double Qbco=0.0;
double d_Qbco_dX=0.0;
  double Qcth=0.0;
double d_Qcth_dX=0.0;
  double Qxf1=0.0;
double d_Qxf1_dX=0.0;
  double Qxf2=0.0;
double d_Qxf2_dX=0.0;
  double dt_et=0.0;
  double dT=0.0;
double d_dT_dX=0.0;
  double ikf_t=0.0;
double d_ikf_t_dX=0.0;
  double rcx_t=0.0;
double d_rcx_t_dX=0.0;
  double rci_t=0.0;
double d_rci_t_dX=0.0;
  double rbx_t=0.0;
double d_rbx_t_dX=0.0;
  double rbi_t=0.0;
double d_rbi_t_dX=0.0;
  double re_t=0.0;
double d_re_t_dX=0.0;
  double rs_t=0.0;
double d_rs_t_dX=0.0;
  double rbp_t=0.0;
double d_rbp_t_dX=0.0;
  double rth_t=0.0;
double d_rth_t_dX=0.0;
  double nf_t=0.0;
double d_nf_t_dX=0.0;
  double nr_t=0.0;
double d_nr_t_dX=0.0;
  double avc2_t=0.0;
double d_avc2_t_dX=0.0;
  double avcx2_t=0.0;
double d_avcx2_t_dX=0.0;
  double vbbe_t=0.0;
double d_vbbe_t_dX=0.0;
  double nbbe_t=0.0;
double d_nbbe_t_dX=0.0;
  double pe_t=0.0;
double d_pe_t_dX=0.0;
  double pc_t=0.0;
double d_pc_t_dX=0.0;
  double ps_t=0.0;
double d_ps_t_dX=0.0;
  double cje_t=0.0;
double d_cje_t_dX=0.0;
  double cjc_t=0.0;
double d_cjc_t_dX=0.0;
  double cjep_t=0.0;
double d_cjep_t_dX=0.0;
  double cjcp_t=0.0;
double d_cjcp_t_dX=0.0;
  double gamm_t=0.0;
double d_gamm_t_dX=0.0;
  double vo_t=0.0;
double d_vo_t_dX=0.0;
  double ebbe_t=0.0;
double d_ebbe_t_dX=0.0;
  double vef_t=0.0;
double d_vef_t_dX=0.0;
  double ver_t=0.0;
double d_ver_t_dX=0.0;
  double Gth=0.0;
double d_Gth_dX=0.0;
  double Ivef=0.0;
double d_Ivef_dX=0.0;
  double Iver=0.0;
double d_Iver_dX=0.0;
  double Iikf=0.0;
double d_Iikf_dX=0.0;
  double Ivo=0.0;
double d_Ivo_dX=0.0;
  double Vbei=0.0;
double d_Vbei_dX=0.0;
  double Vbex=0.0;
double d_Vbex_dX=0.0;
  double Vbci=0.0;
double d_Vbci_dX=0.0;
  double Vbcx=0.0;
double d_Vbcx_dX=0.0;
  double Vbxcx=0.0;
double d_Vbxcx_dX=0.0;
  double Vcei=0.0;
double d_Vcei_dX=0.0;
  double Vbep=0.0;
double d_Vbep_dX=0.0;
  double Vbe=0.0;
double d_Vbe_dX=0.0;
  double Vbc=0.0;
  double Vrcx=0.0;
  double Vrbx=0.0;
  double Vrbi=0.0;
  double Vre=0.0;
  double Vrbp=0.0;
  double Vbcp=0.0;
double d_Vbcp_dX=0.0;
  double Vcep=0.0;
double d_Vcep_dX=0.0;
  double Vrs=0.0;
  double Vxf1=0.0;
  double Vxf2=0.0;
  double qdbe=0.0;
double d_qdbe_dX=0.0;
  double qdbc=0.0;
double d_qdbc_dX=0.0;
  double afac=0.0;
double d_afac_dX=0.0;
  double expi=0.0;
double d_expi_dX=0.0;
  double Ifi=0.0;
double d_Ifi_dX=0.0;
  double Iri=0.0;
double d_Iri_dX=0.0;
  double q1z=0.0;
double d_q1z_dX=0.0;
  double q1=0.0;
double d_q1_dX=0.0;
  double q2=0.0;
double d_q2_dX=0.0;
  double arg=0.0;
double d_arg_dX=0.0;
  double Itzr=0.0;
double d_Itzr_dX=0.0;
  double Itxf=0.0;
double d_Itxf_dX=0.0;
  double expx=0.0;
double d_expx_dX=0.0;
  double Ifp=0.0;
double d_Ifp_dX=0.0;
  double q2p=0.0;
double d_q2p_dX=0.0;
  double Irp=0.0;
double d_Irp_dX=0.0;
  double expn=0.0;
double d_expn_dX=0.0;
  double Bvbe=0.0;
double d_Bvbe_dX=0.0;
  double Ibcj=0.0;
double d_Ibcj_dX=0.0;
  double Kbci=0.0;
double d_Kbci_dX=0.0;
  double Kbcx=0.0;
double d_Kbcx_dX=0.0;
  double Ircx=0.0;
double d_Ircx_dX=0.0;
  double rKp1=0.0;
double d_rKp1_dX=0.0;
  double Iohm=0.0;
double d_Iohm_dX=0.0;
  double derf=0.0;
double d_derf_dX=0.0;
  double Irbx=0.0;
double d_Irbx_dX=0.0;
  double Irbi=0.0;
double d_Irbi_dX=0.0;
  double Ire=0.0;
double d_Ire_dX=0.0;
  double Irbp=0.0;
double d_Irbp_dX=0.0;
  double Irs=0.0;
double d_Irs_dX=0.0;
  double avalf=0.0;
double d_avalf_dX=0.0;
  double Igc=0.0;
double d_Igc_dX=0.0;
  double Igcx=0.0;
double d_Igcx_dX=0.0;
  double VcbFac=0.0;
double d_VcbFac_dX=0.0;
  double Iibk=0.0;
double d_Iibk_dX=0.0;
  double Ibk=0.0;
double d_Ibk_dX=0.0;
  double Ibc=0.0;
double d_Ibc_dX=0.0;
  double Ibcp=0.0;
double d_Ibcp_dX=0.0;
  double power=0.0;
double d_power_dX=0.0;
  double Ith=0.0;
double d_Ith_dX=0.0;
  double Irth=0.0;
double d_Irth_dX=0.0;
  double Ixf1=0.0;
double d_Ixf1_dX=0.0;
  double Ixf2=0.0;


  // -- code converted from analog/code block
//Begin block evaluateStatic
{
dt_et = probeVars[admsProbeID_Temp_dt_GND];

instanceStruct.d_instanceVar_tdevC_dX = instanceStruct.d_instancePar_trise_dX;
instanceStruct.instanceVar_tdevC = (((admsTemperature+instanceStruct.instancePar_trise)+dt_et)-273.15);
if ((instanceStruct.instanceVar_tdevC<(modelStruct.modelPar_tminclip+1.0)))
{
{
double value_exp_0 = exp(((instanceStruct.instanceVar_tdevC-modelStruct.modelPar_tminclip)-1.0));
double  deriv_exp_0_d0 = value_exp_0;
instanceStruct.d_instanceVar_tdevC_dX = (modelStruct.d_modelPar_tminclip_dX+deriv_exp_0_d0*((instanceStruct.d_instanceVar_tdevC_dX-modelStruct.d_modelPar_tminclip_dX)));
instanceStruct.instanceVar_tdevC = (modelStruct.modelPar_tminclip+value_exp_0);
}
}
else
{
if ((instanceStruct.instanceVar_tdevC>(modelStruct.modelPar_tmaxclip-1.0)))
{
{
double value_exp_0 = exp(((modelStruct.modelPar_tmaxclip-instanceStruct.instanceVar_tdevC)-1.0));
double  deriv_exp_0_d0 = value_exp_0;
instanceStruct.d_instanceVar_tdevC_dX = (modelStruct.d_modelPar_tmaxclip_dX-deriv_exp_0_d0*((modelStruct.d_modelPar_tmaxclip_dX-instanceStruct.d_instanceVar_tdevC_dX)));
instanceStruct.instanceVar_tdevC = (modelStruct.modelPar_tmaxclip-value_exp_0);
}
}
else
{
}
}
instanceStruct.d_instanceVar_tdevK_dX = instanceStruct.d_instanceVar_tdevC_dX;
instanceStruct.instanceVar_tdevK = (instanceStruct.instanceVar_tdevC+273.15);
instanceStruct.d_instanceVar_vtv_dX = (1.380662e-23*instanceStruct.d_instanceVar_tdevK_dX/1.602189e-19);
instanceStruct.instanceVar_vtv = ((1.380662e-23*instanceStruct.instanceVar_tdevK)/1.602189e-19);
instanceStruct.d_instanceVar_rT_dX = ((modelStruct.modelVar_tiniK*instanceStruct.d_instanceVar_tdevK_dX-instanceStruct.instanceVar_tdevK*modelStruct.d_modelVar_tiniK_dX)/modelStruct.modelVar_tiniK/modelStruct.modelVar_tiniK);
instanceStruct.instanceVar_rT = (instanceStruct.instanceVar_tdevK/modelStruct.modelVar_tiniK);
d_dT_dX = (instanceStruct.d_instanceVar_tdevK_dX-modelStruct.d_modelVar_tiniK_dX);
dT = (instanceStruct.instanceVar_tdevK-modelStruct.modelVar_tiniK);
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xikf);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xikf/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_ikf_t_dX = (modelStruct.modelPar_ikf*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xikf_dX)))+modelStruct.d_modelPar_ikf_dX*value_pow_0);
ikf_t = (modelStruct.modelPar_ikf*value_pow_0);
}
if (modelStruct.modelPar_given_xrcx)
{
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xrcx);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xrcx/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_rcx_t_dX = (modelStruct.modelPar_rcx*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xrcx_dX)))+modelStruct.d_modelPar_rcx_dX*value_pow_0);
rcx_t = (modelStruct.modelPar_rcx*value_pow_0);
}
}
else
{
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xrc);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xrc/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_rcx_t_dX = (modelStruct.modelPar_rcx*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xrc_dX)))+modelStruct.d_modelPar_rcx_dX*value_pow_0);
rcx_t = (modelStruct.modelPar_rcx*value_pow_0);
}
}
if (modelStruct.modelPar_given_xrci)
{
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xrci);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xrci/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_rci_t_dX = (modelStruct.modelPar_rci*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xrci_dX)))+modelStruct.d_modelPar_rci_dX*value_pow_0);
rci_t = (modelStruct.modelPar_rci*value_pow_0);
}
}
else
{
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xrc);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xrc/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_rci_t_dX = (modelStruct.modelPar_rci*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xrc_dX)))+modelStruct.d_modelPar_rci_dX*value_pow_0);
rci_t = (modelStruct.modelPar_rci*value_pow_0);
}
}
if (modelStruct.modelPar_given_xrbx)
{
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xrbx);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xrbx/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_rbx_t_dX = (modelStruct.modelPar_rbx*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xrbx_dX)))+modelStruct.d_modelPar_rbx_dX*value_pow_0);
rbx_t = (modelStruct.modelPar_rbx*value_pow_0);
}
}
else
{
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xrb);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xrb/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_rbx_t_dX = (modelStruct.modelPar_rbx*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xrb_dX)))+modelStruct.d_modelPar_rbx_dX*value_pow_0);
rbx_t = (modelStruct.modelPar_rbx*value_pow_0);
}
}
if (modelStruct.modelPar_given_xrbi)
{
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xrbi);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xrbi/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_rbi_t_dX = (modelStruct.modelPar_rbi*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xrbi_dX)))+modelStruct.d_modelPar_rbi_dX*value_pow_0);
rbi_t = (modelStruct.modelPar_rbi*value_pow_0);
}
}
else
{
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xrb);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xrb/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_rbi_t_dX = (modelStruct.modelPar_rbi*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xrb_dX)))+modelStruct.d_modelPar_rbi_dX*value_pow_0);
rbi_t = (modelStruct.modelPar_rbi*value_pow_0);
}
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xre);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xre/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_re_t_dX = (modelStruct.modelPar_re*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xre_dX)))+modelStruct.d_modelPar_re_dX*value_pow_0);
re_t = (modelStruct.modelPar_re*value_pow_0);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xrs);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xrs/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_rs_t_dX = (modelStruct.modelPar_rs*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xrs_dX)))+modelStruct.d_modelPar_rs_dX*value_pow_0);
rs_t = (modelStruct.modelPar_rs*value_pow_0);
}
if (modelStruct.modelPar_given_xrbp)
{
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xrbp);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xrbp/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_rbp_t_dX = (modelStruct.modelPar_rbp*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xrbp_dX)))+modelStruct.d_modelPar_rbp_dX*value_pow_0);
rbp_t = (modelStruct.modelPar_rbp*value_pow_0);
}
}
else
{
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xrc);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xrc/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_rbp_t_dX = (modelStruct.modelPar_rbp*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xrc_dX)))+modelStruct.d_modelPar_rbp_dX*value_pow_0);
rbp_t = (modelStruct.modelPar_rbp*value_pow_0);
}
}
d_rth_t_dX = (modelStruct.modelPar_rth*(dT*modelStruct.d_modelPar_tcrth_dX+d_dT_dX*modelStruct.modelPar_tcrth)+modelStruct.d_modelPar_rth_dX*(1.0+(dT*modelStruct.modelPar_tcrth)));
rth_t = (modelStruct.modelPar_rth*(1.0+(dT*modelStruct.modelPar_tcrth)));
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xis/modelStruct.modelPar_nf));
double value_exp_1 = exp((((-modelStruct.modelPar_ea)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nf)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xis/modelStruct.modelPar_nf)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_is_t_dX = ((modelStruct.modelPar_is*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nf)*((-modelStruct.modelPar_ea)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_ea_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_ea)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nf_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nf))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nf)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nf)))+(modelStruct.modelPar_is*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nf*modelStruct.d_modelPar_xis_dX-modelStruct.modelPar_xis*modelStruct.d_modelPar_nf_dX)/modelStruct.modelPar_nf/modelStruct.modelPar_nf))))+modelStruct.d_modelPar_is_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_is_t = ((modelStruct.modelPar_is*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xisr/modelStruct.modelPar_nr));
double value_exp_1 = exp((((-modelStruct.modelPar_dear)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nr)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xisr/modelStruct.modelPar_nr)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_isrr_t_dX = ((modelStruct.modelPar_isrr*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nr)*((-modelStruct.modelPar_dear)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_dear_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_dear)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nr_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nr))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nr)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nr)))+(modelStruct.modelPar_isrr*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nr*modelStruct.d_modelPar_xisr_dX-modelStruct.modelPar_xisr*modelStruct.d_modelPar_nr_dX)/modelStruct.modelPar_nr/modelStruct.modelPar_nr))))+modelStruct.d_modelPar_isrr_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_isrr_t = ((modelStruct.modelPar_isrr*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xis/modelStruct.modelPar_nfp));
double value_exp_1 = exp((((-modelStruct.modelPar_eap)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nfp)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xis/modelStruct.modelPar_nfp)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_isp_t_dX = ((modelStruct.modelPar_isp*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nfp)*((-modelStruct.modelPar_eap)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eap_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eap)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nfp_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nfp))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nfp)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nfp)))+(modelStruct.modelPar_isp*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nfp*modelStruct.d_modelPar_xis_dX-modelStruct.modelPar_xis*modelStruct.d_modelPar_nfp_dX)/modelStruct.modelPar_nfp/modelStruct.modelPar_nfp))))+modelStruct.d_modelPar_isp_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_isp_t = ((modelStruct.modelPar_isp*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xii/modelStruct.modelPar_nei));
double value_exp_1 = exp((((-modelStruct.modelPar_eaie)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nei)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xii/modelStruct.modelPar_nei)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibei_t_dX = ((modelStruct.modelPar_ibei*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nei)*((-modelStruct.modelPar_eaie)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eaie_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eaie)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nei_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nei))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nei)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nei)))+(modelStruct.modelPar_ibei*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nei*modelStruct.d_modelPar_xii_dX-modelStruct.modelPar_xii*modelStruct.d_modelPar_nei_dX)/modelStruct.modelPar_nei/modelStruct.modelPar_nei))))+modelStruct.d_modelPar_ibei_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibei_t = ((modelStruct.modelPar_ibei*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xin/modelStruct.modelPar_nen));
double value_exp_1 = exp((((-modelStruct.modelPar_eane)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nen)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xin/modelStruct.modelPar_nen)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_iben_t_dX = ((modelStruct.modelPar_iben*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nen)*((-modelStruct.modelPar_eane)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eane_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eane)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nen_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nen))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nen)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nen)))+(modelStruct.modelPar_iben*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nen*modelStruct.d_modelPar_xin_dX-modelStruct.modelPar_xin*modelStruct.d_modelPar_nen_dX)/modelStruct.modelPar_nen/modelStruct.modelPar_nen))))+modelStruct.d_modelPar_iben_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_iben_t = ((modelStruct.modelPar_iben*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xii/modelStruct.modelPar_nci));
double value_exp_1 = exp((((-modelStruct.modelPar_eaic)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xii/modelStruct.modelPar_nci)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibci_t_dX = ((modelStruct.modelPar_ibci*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)*((-modelStruct.modelPar_eaic)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eaic_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eaic)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nci_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nci))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)))+(modelStruct.modelPar_ibci*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nci*modelStruct.d_modelPar_xii_dX-modelStruct.modelPar_xii*modelStruct.d_modelPar_nci_dX)/modelStruct.modelPar_nci/modelStruct.modelPar_nci))))+modelStruct.d_modelPar_ibci_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibci_t = ((modelStruct.modelPar_ibci*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xin/modelStruct.modelPar_ncn));
double value_exp_1 = exp((((-modelStruct.modelPar_eanc)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xin/modelStruct.modelPar_ncn)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibcn_t_dX = ((modelStruct.modelPar_ibcn*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)*((-modelStruct.modelPar_eanc)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eanc_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eanc)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_ncn_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_ncn))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)))+(modelStruct.modelPar_ibcn*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_ncn*modelStruct.d_modelPar_xin_dX-modelStruct.modelPar_xin*modelStruct.d_modelPar_ncn_dX)/modelStruct.modelPar_ncn/modelStruct.modelPar_ncn))))+modelStruct.d_modelPar_ibcn_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibcn_t = ((modelStruct.modelPar_ibcn*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xii/modelStruct.modelPar_nci));
double value_exp_1 = exp((((-modelStruct.modelPar_eaic)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xii/modelStruct.modelPar_nci)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibeip_t_dX = ((modelStruct.modelPar_ibeip*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)*((-modelStruct.modelPar_eaic)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eaic_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eaic)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_nci_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_nci))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_nci)))+(modelStruct.modelPar_ibeip*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_nci*modelStruct.d_modelPar_xii_dX-modelStruct.modelPar_xii*modelStruct.d_modelPar_nci_dX)/modelStruct.modelPar_nci/modelStruct.modelPar_nci))))+modelStruct.d_modelPar_ibeip_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibeip_t = ((modelStruct.modelPar_ibeip*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xin/modelStruct.modelPar_ncn));
double value_exp_1 = exp((((-modelStruct.modelPar_eanc)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xin/modelStruct.modelPar_ncn)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibenp_t_dX = ((modelStruct.modelPar_ibenp*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)*((-modelStruct.modelPar_eanc)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eanc_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eanc)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_ncn_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_ncn))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncn)))+(modelStruct.modelPar_ibenp*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_ncn*modelStruct.d_modelPar_xin_dX-modelStruct.modelPar_xin*modelStruct.d_modelPar_ncn_dX)/modelStruct.modelPar_ncn/modelStruct.modelPar_ncn))))+modelStruct.d_modelPar_ibenp_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibenp_t = ((modelStruct.modelPar_ibenp*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xii/modelStruct.modelPar_ncip));
double value_exp_1 = exp((((-modelStruct.modelPar_eais)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncip)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xii/modelStruct.modelPar_ncip)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibcip_t_dX = ((modelStruct.modelPar_ibcip*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncip)*((-modelStruct.modelPar_eais)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eais_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eais)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_ncip_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_ncip))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncip)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncip)))+(modelStruct.modelPar_ibcip*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_ncip*modelStruct.d_modelPar_xii_dX-modelStruct.modelPar_xii*modelStruct.d_modelPar_ncip_dX)/modelStruct.modelPar_ncip/modelStruct.modelPar_ncip))))+modelStruct.d_modelPar_ibcip_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibcip_t = ((modelStruct.modelPar_ibcip*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,(modelStruct.modelPar_xin/modelStruct.modelPar_ncnp));
double value_exp_1 = exp((((-modelStruct.modelPar_eans)*(1.0-instanceStruct.instanceVar_rT))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncnp)));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_xin/modelStruct.modelPar_ncnp)/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
instanceStruct.d_instanceVar_ibcnp_t_dX = ((modelStruct.modelPar_ibcnp*value_pow_0)*deriv_exp_1_d0*((((instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncnp)*((-modelStruct.modelPar_eans)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_eans_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_eans)*(1.0-instanceStruct.instanceVar_rT))*(instanceStruct.instanceVar_vtv*modelStruct.d_modelPar_ncnp_dX+instanceStruct.d_instanceVar_vtv_dX*modelStruct.modelPar_ncnp))/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncnp)/(instanceStruct.instanceVar_vtv*modelStruct.modelPar_ncnp)))+(modelStruct.modelPar_ibcnp*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(((modelStruct.modelPar_ncnp*modelStruct.d_modelPar_xin_dX-modelStruct.modelPar_xin*modelStruct.d_modelPar_ncnp_dX)/modelStruct.modelPar_ncnp/modelStruct.modelPar_ncnp))))+modelStruct.d_modelPar_ibcnp_dX*value_pow_0)*value_exp_1);
instanceStruct.instanceVar_ibcnp_t = ((modelStruct.modelPar_ibcnp*value_pow_0)*value_exp_1);
}
d_nf_t_dX = (modelStruct.modelPar_nf*(dT*modelStruct.d_modelPar_tnf_dX+d_dT_dX*modelStruct.modelPar_tnf)+modelStruct.d_modelPar_nf_dX*(1.0+(dT*modelStruct.modelPar_tnf)));
nf_t = (modelStruct.modelPar_nf*(1.0+(dT*modelStruct.modelPar_tnf)));
d_nr_t_dX = (modelStruct.modelPar_nr*(dT*modelStruct.d_modelPar_tnf_dX+d_dT_dX*modelStruct.modelPar_tnf)+modelStruct.d_modelPar_nr_dX*(1.0+(dT*modelStruct.modelPar_tnf)));
nr_t = (modelStruct.modelPar_nr*(1.0+(dT*modelStruct.modelPar_tnf)));
d_avc2_t_dX = (modelStruct.modelPar_avc2*(dT*modelStruct.d_modelPar_tavc_dX+d_dT_dX*modelStruct.modelPar_tavc)+modelStruct.d_modelPar_avc2_dX*(1.0+(dT*modelStruct.modelPar_tavc)));
avc2_t = (modelStruct.modelPar_avc2*(1.0+(dT*modelStruct.modelPar_tavc)));
d_avcx2_t_dX = (modelStruct.modelPar_avcx2*(dT*modelStruct.d_modelPar_tavcx_dX+d_dT_dX*modelStruct.modelPar_tavcx)+modelStruct.d_modelPar_avcx2_dX*(1.0+(dT*modelStruct.modelPar_tavcx)));
avcx2_t = (modelStruct.modelPar_avcx2*(1.0+(dT*modelStruct.modelPar_tavcx)));
d_vbbe_t_dX = (modelStruct.modelPar_vbbe*(dT*(modelStruct.d_modelPar_tvbbe1_dX+(dT*modelStruct.d_modelPar_tvbbe2_dX+d_dT_dX*modelStruct.modelPar_tvbbe2))+d_dT_dX*(modelStruct.modelPar_tvbbe1+(dT*modelStruct.modelPar_tvbbe2)))+modelStruct.d_modelPar_vbbe_dX*(1.0+(dT*(modelStruct.modelPar_tvbbe1+(dT*modelStruct.modelPar_tvbbe2)))));
vbbe_t = (modelStruct.modelPar_vbbe*(1.0+(dT*(modelStruct.modelPar_tvbbe1+(dT*modelStruct.modelPar_tvbbe2)))));
d_nbbe_t_dX = (modelStruct.modelPar_nbbe*(dT*modelStruct.d_modelPar_tnbbe_dX+d_dT_dX*modelStruct.modelPar_tnbbe)+modelStruct.d_modelPar_nbbe_dX*(1.0+(dT*modelStruct.modelPar_tnbbe)));
nbbe_t = (modelStruct.modelPar_nbbe*(1.0+(dT*modelStruct.modelPar_tnbbe)));
//Begin block pePsibiBlock
{
//Block-local variables for block pePsibiBlock
double psiio=0.0;
double d_psiio_dX=0.0;
double psiin=0.0;
double d_psiin_dX=0.0;
//End of Block-local variables
{
double value_exp_0 = exp((((0.5*modelStruct.modelPar_pe)*instanceStruct.instanceVar_rT)/instanceStruct.instanceVar_vtv));
double value_exp_1 = exp(((((-0.5)*modelStruct.modelPar_pe)*instanceStruct.instanceVar_rT)/instanceStruct.instanceVar_vtv));
double value_log_2 = log((value_exp_0-value_exp_1));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_exp_1_d0 = value_exp_1;
double  deriv_log_2_d0 = (1.0/(value_exp_0-value_exp_1));
d_psiio_dX = ((2.0*(instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_rT))*deriv_log_2_d0*((deriv_exp_0_d0*(((instanceStruct.instanceVar_vtv*((0.5*modelStruct.modelPar_pe)*instanceStruct.d_instanceVar_rT_dX+0.5*modelStruct.d_modelPar_pe_dX*instanceStruct.instanceVar_rT)-((0.5*modelStruct.modelPar_pe)*instanceStruct.instanceVar_rT)*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv))-deriv_exp_1_d0*(((instanceStruct.instanceVar_vtv*(((-0.5)*modelStruct.modelPar_pe)*instanceStruct.d_instanceVar_rT_dX+(-0.5)*modelStruct.d_modelPar_pe_dX*instanceStruct.instanceVar_rT)-(((-0.5)*modelStruct.modelPar_pe)*instanceStruct.instanceVar_rT)*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv))))+2.0*((instanceStruct.instanceVar_rT*instanceStruct.d_instanceVar_vtv_dX-instanceStruct.instanceVar_vtv*instanceStruct.d_instanceVar_rT_dX)/instanceStruct.instanceVar_rT/instanceStruct.instanceVar_rT)*value_log_2);
psiio = ((2.0*(instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_rT))*value_log_2);
}
{
double value_log_0 = log(instanceStruct.instanceVar_rT);
double  deriv_log_0_d0 = (1.0/instanceStruct.instanceVar_rT);
d_psiin_dX = (((psiio*instanceStruct.d_instanceVar_rT_dX+d_psiio_dX*instanceStruct.instanceVar_rT)-((3.0*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(instanceStruct.d_instanceVar_rT_dX)+3.0*instanceStruct.d_instanceVar_vtv_dX*value_log_0))-(modelStruct.modelPar_eaie*instanceStruct.d_instanceVar_rT_dX+modelStruct.d_modelPar_eaie_dX*(instanceStruct.instanceVar_rT-1.0)));
psiin = (((psiio*instanceStruct.instanceVar_rT)-((3.0*instanceStruct.instanceVar_vtv)*value_log_0))-(modelStruct.modelPar_eaie*(instanceStruct.instanceVar_rT-1.0)));
}
{
double value_exp_0 = exp(((-psiin)/instanceStruct.instanceVar_vtv));
double value_sqrt_1 = sqrt((1.0+(4.0*value_exp_0)));
double value_log_2 = log((0.5*(1.0+value_sqrt_1)));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);
double  deriv_log_2_d0 = (1.0/(0.5*(1.0+value_sqrt_1)));
d_pe_t_dX = (d_psiin_dX+((2.0*instanceStruct.instanceVar_vtv)*deriv_log_2_d0*(0.5*deriv_sqrt_1_d0*(4.0*deriv_exp_0_d0*(((instanceStruct.instanceVar_vtv*(-d_psiin_dX)-(-psiin)*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv))))+2.0*instanceStruct.d_instanceVar_vtv_dX*value_log_2));
pe_t = (psiin+((2.0*instanceStruct.instanceVar_vtv)*value_log_2));
}
}
// End block pePsibiBlock
//Begin block pcPsibiBlock
{
//Block-local variables for block pcPsibiBlock
double psiio=0.0;
double d_psiio_dX=0.0;
double psiin=0.0;
double d_psiin_dX=0.0;
//End of Block-local variables
{
double value_exp_0 = exp((((0.5*modelStruct.modelPar_pc)*instanceStruct.instanceVar_rT)/instanceStruct.instanceVar_vtv));
double value_exp_1 = exp(((((-0.5)*modelStruct.modelPar_pc)*instanceStruct.instanceVar_rT)/instanceStruct.instanceVar_vtv));
double value_log_2 = log((value_exp_0-value_exp_1));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_exp_1_d0 = value_exp_1;
double  deriv_log_2_d0 = (1.0/(value_exp_0-value_exp_1));
d_psiio_dX = ((2.0*(instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_rT))*deriv_log_2_d0*((deriv_exp_0_d0*(((instanceStruct.instanceVar_vtv*((0.5*modelStruct.modelPar_pc)*instanceStruct.d_instanceVar_rT_dX+0.5*modelStruct.d_modelPar_pc_dX*instanceStruct.instanceVar_rT)-((0.5*modelStruct.modelPar_pc)*instanceStruct.instanceVar_rT)*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv))-deriv_exp_1_d0*(((instanceStruct.instanceVar_vtv*(((-0.5)*modelStruct.modelPar_pc)*instanceStruct.d_instanceVar_rT_dX+(-0.5)*modelStruct.d_modelPar_pc_dX*instanceStruct.instanceVar_rT)-(((-0.5)*modelStruct.modelPar_pc)*instanceStruct.instanceVar_rT)*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv))))+2.0*((instanceStruct.instanceVar_rT*instanceStruct.d_instanceVar_vtv_dX-instanceStruct.instanceVar_vtv*instanceStruct.d_instanceVar_rT_dX)/instanceStruct.instanceVar_rT/instanceStruct.instanceVar_rT)*value_log_2);
psiio = ((2.0*(instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_rT))*value_log_2);
}
{
double value_log_0 = log(instanceStruct.instanceVar_rT);
double  deriv_log_0_d0 = (1.0/instanceStruct.instanceVar_rT);
d_psiin_dX = (((psiio*instanceStruct.d_instanceVar_rT_dX+d_psiio_dX*instanceStruct.instanceVar_rT)-((3.0*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(instanceStruct.d_instanceVar_rT_dX)+3.0*instanceStruct.d_instanceVar_vtv_dX*value_log_0))-(modelStruct.modelPar_eaic*instanceStruct.d_instanceVar_rT_dX+modelStruct.d_modelPar_eaic_dX*(instanceStruct.instanceVar_rT-1.0)));
psiin = (((psiio*instanceStruct.instanceVar_rT)-((3.0*instanceStruct.instanceVar_vtv)*value_log_0))-(modelStruct.modelPar_eaic*(instanceStruct.instanceVar_rT-1.0)));
}
{
double value_exp_0 = exp(((-psiin)/instanceStruct.instanceVar_vtv));
double value_sqrt_1 = sqrt((1.0+(4.0*value_exp_0)));
double value_log_2 = log((0.5*(1.0+value_sqrt_1)));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);
double  deriv_log_2_d0 = (1.0/(0.5*(1.0+value_sqrt_1)));
d_pc_t_dX = (d_psiin_dX+((2.0*instanceStruct.instanceVar_vtv)*deriv_log_2_d0*(0.5*deriv_sqrt_1_d0*(4.0*deriv_exp_0_d0*(((instanceStruct.instanceVar_vtv*(-d_psiin_dX)-(-psiin)*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv))))+2.0*instanceStruct.d_instanceVar_vtv_dX*value_log_2));
pc_t = (psiin+((2.0*instanceStruct.instanceVar_vtv)*value_log_2));
}
}
// End block pcPsibiBlock
//Begin block psPsibiBlock
{
//Block-local variables for block psPsibiBlock
double psiio=0.0;
double d_psiio_dX=0.0;
double psiin=0.0;
double d_psiin_dX=0.0;
//End of Block-local variables
{
double value_exp_0 = exp((((0.5*modelStruct.modelPar_ps)*instanceStruct.instanceVar_rT)/instanceStruct.instanceVar_vtv));
double value_exp_1 = exp(((((-0.5)*modelStruct.modelPar_ps)*instanceStruct.instanceVar_rT)/instanceStruct.instanceVar_vtv));
double value_log_2 = log((value_exp_0-value_exp_1));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_exp_1_d0 = value_exp_1;
double  deriv_log_2_d0 = (1.0/(value_exp_0-value_exp_1));
d_psiio_dX = ((2.0*(instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_rT))*deriv_log_2_d0*((deriv_exp_0_d0*(((instanceStruct.instanceVar_vtv*((0.5*modelStruct.modelPar_ps)*instanceStruct.d_instanceVar_rT_dX+0.5*modelStruct.d_modelPar_ps_dX*instanceStruct.instanceVar_rT)-((0.5*modelStruct.modelPar_ps)*instanceStruct.instanceVar_rT)*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv))-deriv_exp_1_d0*(((instanceStruct.instanceVar_vtv*(((-0.5)*modelStruct.modelPar_ps)*instanceStruct.d_instanceVar_rT_dX+(-0.5)*modelStruct.d_modelPar_ps_dX*instanceStruct.instanceVar_rT)-(((-0.5)*modelStruct.modelPar_ps)*instanceStruct.instanceVar_rT)*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv))))+2.0*((instanceStruct.instanceVar_rT*instanceStruct.d_instanceVar_vtv_dX-instanceStruct.instanceVar_vtv*instanceStruct.d_instanceVar_rT_dX)/instanceStruct.instanceVar_rT/instanceStruct.instanceVar_rT)*value_log_2);
psiio = ((2.0*(instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_rT))*value_log_2);
}
{
double value_log_0 = log(instanceStruct.instanceVar_rT);
double  deriv_log_0_d0 = (1.0/instanceStruct.instanceVar_rT);
d_psiin_dX = (((psiio*instanceStruct.d_instanceVar_rT_dX+d_psiio_dX*instanceStruct.instanceVar_rT)-((3.0*instanceStruct.instanceVar_vtv)*deriv_log_0_d0*(instanceStruct.d_instanceVar_rT_dX)+3.0*instanceStruct.d_instanceVar_vtv_dX*value_log_0))-(modelStruct.modelPar_eais*instanceStruct.d_instanceVar_rT_dX+modelStruct.d_modelPar_eais_dX*(instanceStruct.instanceVar_rT-1.0)));
psiin = (((psiio*instanceStruct.instanceVar_rT)-((3.0*instanceStruct.instanceVar_vtv)*value_log_0))-(modelStruct.modelPar_eais*(instanceStruct.instanceVar_rT-1.0)));
}
{
double value_exp_0 = exp(((-psiin)/instanceStruct.instanceVar_vtv));
double value_sqrt_1 = sqrt((1.0+(4.0*value_exp_0)));
double value_log_2 = log((0.5*(1.0+value_sqrt_1)));
double  deriv_exp_0_d0 = value_exp_0;
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);
double  deriv_log_2_d0 = (1.0/(0.5*(1.0+value_sqrt_1)));
d_ps_t_dX = (d_psiin_dX+((2.0*instanceStruct.instanceVar_vtv)*deriv_log_2_d0*(0.5*deriv_sqrt_1_d0*(4.0*deriv_exp_0_d0*(((instanceStruct.instanceVar_vtv*(-d_psiin_dX)-(-psiin)*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv))))+2.0*instanceStruct.d_instanceVar_vtv_dX*value_log_2));
ps_t = (psiin+((2.0*instanceStruct.instanceVar_vtv)*value_log_2));
}
}
// End block psPsibiBlock
{
double value_pow_0 = pow((modelStruct.modelPar_pe/pe_t),modelStruct.modelPar_me);
double  deriv_pow_0_d0 = (((modelStruct.modelPar_pe/pe_t) == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_me/(modelStruct.modelPar_pe/pe_t)));
double  deriv_pow_0_d1 = ((modelStruct.modelPar_pe/pe_t) == 0.0)?0.0:(log((modelStruct.modelPar_pe/pe_t))*value_pow_0);
d_cje_t_dX = (modelStruct.modelPar_cje*((deriv_pow_0_d0*(((pe_t*modelStruct.d_modelPar_pe_dX-modelStruct.modelPar_pe*d_pe_t_dX)/pe_t/pe_t)))+(deriv_pow_0_d1*(modelStruct.d_modelPar_me_dX)))+modelStruct.d_modelPar_cje_dX*value_pow_0);
cje_t = (modelStruct.modelPar_cje*value_pow_0);
}
{
double value_pow_0 = pow((modelStruct.modelPar_pc/pc_t),modelStruct.modelPar_mc);
double  deriv_pow_0_d0 = (((modelStruct.modelPar_pc/pc_t) == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_mc/(modelStruct.modelPar_pc/pc_t)));
double  deriv_pow_0_d1 = ((modelStruct.modelPar_pc/pc_t) == 0.0)?0.0:(log((modelStruct.modelPar_pc/pc_t))*value_pow_0);
d_cjc_t_dX = (modelStruct.modelPar_cjc*((deriv_pow_0_d0*(((pc_t*modelStruct.d_modelPar_pc_dX-modelStruct.modelPar_pc*d_pc_t_dX)/pc_t/pc_t)))+(deriv_pow_0_d1*(modelStruct.d_modelPar_mc_dX)))+modelStruct.d_modelPar_cjc_dX*value_pow_0);
cjc_t = (modelStruct.modelPar_cjc*value_pow_0);
}
{
double value_pow_0 = pow((modelStruct.modelPar_pc/pc_t),modelStruct.modelPar_mc);
double  deriv_pow_0_d0 = (((modelStruct.modelPar_pc/pc_t) == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_mc/(modelStruct.modelPar_pc/pc_t)));
double  deriv_pow_0_d1 = ((modelStruct.modelPar_pc/pc_t) == 0.0)?0.0:(log((modelStruct.modelPar_pc/pc_t))*value_pow_0);
d_cjep_t_dX = (modelStruct.modelPar_cjep*((deriv_pow_0_d0*(((pc_t*modelStruct.d_modelPar_pc_dX-modelStruct.modelPar_pc*d_pc_t_dX)/pc_t/pc_t)))+(deriv_pow_0_d1*(modelStruct.d_modelPar_mc_dX)))+modelStruct.d_modelPar_cjep_dX*value_pow_0);
cjep_t = (modelStruct.modelPar_cjep*value_pow_0);
}
{
double value_pow_0 = pow((modelStruct.modelPar_ps/ps_t),modelStruct.modelPar_ms);
double  deriv_pow_0_d0 = (((modelStruct.modelPar_ps/ps_t) == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_ms/(modelStruct.modelPar_ps/ps_t)));
double  deriv_pow_0_d1 = ((modelStruct.modelPar_ps/ps_t) == 0.0)?0.0:(log((modelStruct.modelPar_ps/ps_t))*value_pow_0);
d_cjcp_t_dX = (modelStruct.modelPar_cjcp*((deriv_pow_0_d0*(((ps_t*modelStruct.d_modelPar_ps_dX-modelStruct.modelPar_ps*d_ps_t_dX)/ps_t/ps_t)))+(deriv_pow_0_d1*(modelStruct.d_modelPar_ms_dX)))+modelStruct.d_modelPar_cjcp_dX*value_pow_0);
cjcp_t = (modelStruct.modelPar_cjcp*value_pow_0);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xis);
double value_exp_1 = exp((((-modelStruct.modelPar_ea)*(1.0-instanceStruct.instanceVar_rT))/instanceStruct.instanceVar_vtv));
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xis/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
double  deriv_exp_1_d0 = value_exp_1;
d_gamm_t_dX = ((modelStruct.modelPar_gamm*value_pow_0)*deriv_exp_1_d0*(((instanceStruct.instanceVar_vtv*((-modelStruct.modelPar_ea)*(-instanceStruct.d_instanceVar_rT_dX)+(-modelStruct.d_modelPar_ea_dX)*(1.0-instanceStruct.instanceVar_rT))-((-modelStruct.modelPar_ea)*(1.0-instanceStruct.instanceVar_rT))*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv))+(modelStruct.modelPar_gamm*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xis_dX)))+modelStruct.d_modelPar_gamm_dX*value_pow_0)*value_exp_1);
gamm_t = ((modelStruct.modelPar_gamm*value_pow_0)*value_exp_1);
}
{
double value_pow_0 = pow(instanceStruct.instanceVar_rT,modelStruct.modelPar_xvo);
double  deriv_pow_0_d0 = ((instanceStruct.instanceVar_rT == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_xvo/instanceStruct.instanceVar_rT));
double  deriv_pow_0_d1 = (instanceStruct.instanceVar_rT == 0.0)?0.0:(log(instanceStruct.instanceVar_rT)*value_pow_0);
d_vo_t_dX = (modelStruct.modelPar_vo*((deriv_pow_0_d0*(instanceStruct.d_instanceVar_rT_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_xvo_dX)))+modelStruct.d_modelPar_vo_dX*value_pow_0);
vo_t = (modelStruct.modelPar_vo*value_pow_0);
}
{
double value_exp_0 = exp(((-vbbe_t)/(nbbe_t*instanceStruct.instanceVar_vtv)));
double  deriv_exp_0_d0 = value_exp_0;
d_ebbe_t_dX = deriv_exp_0_d0*((((nbbe_t*instanceStruct.instanceVar_vtv)*(-d_vbbe_t_dX)-(-vbbe_t)*(nbbe_t*instanceStruct.d_instanceVar_vtv_dX+d_nbbe_t_dX*instanceStruct.instanceVar_vtv))/(nbbe_t*instanceStruct.instanceVar_vtv)/(nbbe_t*instanceStruct.instanceVar_vtv)));
ebbe_t = value_exp_0;
}
d_vef_t_dX = (modelStruct.modelPar_vef*(dT*modelStruct.d_modelPar_tcvef_dX+d_dT_dX*modelStruct.modelPar_tcvef)+modelStruct.d_modelPar_vef_dX*(1.0+(dT*modelStruct.modelPar_tcvef)));
vef_t = (modelStruct.modelPar_vef*(1.0+(dT*modelStruct.modelPar_tcvef)));
d_ver_t_dX = (modelStruct.modelPar_ver*(dT*modelStruct.d_modelPar_tcver_dX+d_dT_dX*modelStruct.modelPar_tcver)+modelStruct.d_modelPar_ver_dX*(1.0+(dT*modelStruct.modelPar_tcver)));
ver_t = (modelStruct.modelPar_ver*(1.0+(dT*modelStruct.modelPar_tcver)));
instanceStruct.d_instanceVar_Gcx_dX = ((rcx_t>1.0e-3)?(-d_rcx_t_dX/rcx_t/rcx_t):0.0);
instanceStruct.instanceVar_Gcx = ((rcx_t>1.0e-3)?(1.0/rcx_t):1.0e3);
instanceStruct.d_instanceVar_Gci_dX = ((rci_t>1.0e-3)?(-d_rci_t_dX/rci_t/rci_t):0.0);
instanceStruct.instanceVar_Gci = ((rci_t>1.0e-3)?(1.0/rci_t):1.0e3);
instanceStruct.d_instanceVar_Gbx_dX = ((rbx_t>1.0e-3)?(-d_rbx_t_dX/rbx_t/rbx_t):0.0);
instanceStruct.instanceVar_Gbx = ((rbx_t>1.0e-3)?(1.0/rbx_t):1.0e3);
instanceStruct.d_instanceVar_Gbi_dX = ((rbi_t>1.0e-3)?(-d_rbi_t_dX/rbi_t/rbi_t):0.0);
instanceStruct.instanceVar_Gbi = ((rbi_t>1.0e-3)?(1.0/rbi_t):1.0e3);
instanceStruct.d_instanceVar_Ge_dX = ((re_t>1.0e-3)?(-d_re_t_dX/re_t/re_t):0.0);
instanceStruct.instanceVar_Ge = ((re_t>1.0e-3)?(1.0/re_t):1.0e3);
instanceStruct.d_instanceVar_Gbp_dX = ((rbp_t>1.0e-3)?(-d_rbp_t_dX/rbp_t/rbp_t):0.0);
instanceStruct.instanceVar_Gbp = ((rbp_t>1.0e-3)?(1.0/rbp_t):1.0e3);
instanceStruct.d_instanceVar_Gs_dX = ((rs_t>1.0e-3)?(-d_rs_t_dX/rs_t/rs_t):0.0);
instanceStruct.instanceVar_Gs = ((rs_t>1.0e-3)?(1.0/rs_t):1.0e3);
d_Gth_dX = ((rth_t>1.0e-3)?(-d_rth_t_dX/rth_t/rth_t):0.0);
Gth = ((rth_t>1.0e-3)?(1.0/rth_t):1.0e3);
d_Ivef_dX = ((vef_t>0.0)?(-d_vef_t_dX/vef_t/vef_t):0.0);
Ivef = ((vef_t>0.0)?(1.0/vef_t):0.0);
d_Iver_dX = ((ver_t>0.0)?(-d_ver_t_dX/ver_t/ver_t):0.0);
Iver = ((ver_t>0.0)?(1.0/ver_t):0.0);
d_Iikf_dX = ((ikf_t>0.0)?(-d_ikf_t_dX/ikf_t/ikf_t):0.0);
Iikf = ((ikf_t>0.0)?(1.0/ikf_t):0.0);
d_Ivo_dX = ((vo_t>0.0)?(-d_vo_t_dX/vo_t/vo_t):0.0);
Ivo = ((vo_t>0.0)?(1.0/vo_t):0.0);
Vbei = probeVars[admsProbeID_V_bi_ei];

Vbex = probeVars[admsProbeID_V_bx_ei];

Vbci = probeVars[admsProbeID_V_bi_ci];

Vbcx = probeVars[admsProbeID_V_bi_cx];

Vbxcx = probeVars[admsProbeID_V_bx_cx];

d_Vcei_dX = 0.0;
Vcei = (modelStruct.modelPar_VBICtype*(probeVars[admsProbeID_V_ci_ei]));
Vbep = probeVars[admsProbeID_V_bx_bp];

Vbe = probeVars[admsProbeID_V_b_e];

Vbc = (probeVars[admsProbeID_V_b_c]);
Vrcx = (probeVars[admsProbeID_V_c_cx]);
instanceStruct.d_instanceVar_Vrci_dX = 0.0;
instanceStruct.instanceVar_Vrci = (modelStruct.modelPar_VBICtype*(probeVars[admsProbeID_V_cx_ci]));
Vrbx = (probeVars[admsProbeID_V_b_bx]);
Vrbi = (probeVars[admsProbeID_V_bx_bi]);
Vre = (probeVars[admsProbeID_V_e_ei]);
Vrbp = (probeVars[admsProbeID_V_bp_cx]);
d_Vbcp_dX = 0.0;
Vbcp = (modelStruct.modelPar_VBICtype*(probeVars[admsProbeID_V_si_bp]));
d_Vcep_dX = 0.0;
Vcep = (modelStruct.modelPar_VBICtype*(probeVars[admsProbeID_V_bx_si]));
Vrs = (probeVars[admsProbeID_V_s_si]);
Vxf1 = (probeVars[admsProbeID_V_xf1_GND]);
Vxf2 = (probeVars[admsProbeID_V_xf2_GND]);
//Begin block qdbeBlock
{
//Block-local variables for block qdbeBlock
double dv0=0.0;
double d_dv0_dX=0.0;
double dvh=0.0;
double d_dvh_dX=0.0;
double pwq=0.0;
double d_pwq_dX=0.0;
double qlo=0.0;
double d_qlo_dX=0.0;
double qhi=0.0;
double d_qhi_dX=0.0;
double mv0=0.0;
double d_mv0_dX=0.0;
double vl0=0.0;
double d_vl0_dX=0.0;
double q0=0.0;
double d_q0_dX=0.0;
double dv=0.0;
double d_dv_dX=0.0;
double mv=0.0;
double d_mv_dX=0.0;
double vl=0.0;
double d_vl_dX=0.0;
//End of Block-local variables
d_dv0_dX = ((-pe_t)*modelStruct.d_modelPar_fc_dX+(-d_pe_t_dX)*modelStruct.modelPar_fc);
dv0 = ((-pe_t)*modelStruct.modelPar_fc);
if ((modelStruct.modelPar_aje<=0.0))
{
d_dvh_dX = (d_Vbei_dX+d_dv0_dX);
dvh = (Vbei+dv0);
if ((dvh>0.0))
{
{
double value_pow_0 = pow((1.0-modelStruct.modelPar_fc),(-modelStruct.modelPar_me));
double  deriv_pow_0_d0 = (((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_fc)));
double  deriv_pow_0_d1 = ((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(log((1.0-modelStruct.modelPar_fc))*value_pow_0);
d_pwq_dX = ((deriv_pow_0_d0*((-modelStruct.d_modelPar_fc_dX)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_me_dX))));
pwq = value_pow_0;
}
d_qlo_dX = (((1.0-modelStruct.modelPar_me)*(pe_t*(-(pwq*(-modelStruct.d_modelPar_fc_dX)+d_pwq_dX*(1.0-modelStruct.modelPar_fc)))+d_pe_t_dX*(1.0-(pwq*(1.0-modelStruct.modelPar_fc))))-(pe_t*(1.0-(pwq*(1.0-modelStruct.modelPar_fc))))*(-modelStruct.d_modelPar_me_dX))/(1.0-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_me));
qlo = ((pe_t*(1.0-(pwq*(1.0-modelStruct.modelPar_fc))))/(1.0-modelStruct.modelPar_me));
d_qhi_dX = ((dvh*(1.0+(((0.5*modelStruct.modelPar_me)*dvh)/(pe_t*(1.0-modelStruct.modelPar_fc)))))*d_pwq_dX+(dvh*(((pe_t*(1.0-modelStruct.modelPar_fc))*((0.5*modelStruct.modelPar_me)*d_dvh_dX+0.5*modelStruct.d_modelPar_me_dX*dvh)-((0.5*modelStruct.modelPar_me)*dvh)*(pe_t*(-modelStruct.d_modelPar_fc_dX)+d_pe_t_dX*(1.0-modelStruct.modelPar_fc)))/(pe_t*(1.0-modelStruct.modelPar_fc))/(pe_t*(1.0-modelStruct.modelPar_fc)))+d_dvh_dX*(1.0+(((0.5*modelStruct.modelPar_me)*dvh)/(pe_t*(1.0-modelStruct.modelPar_fc)))))*pwq);
qhi = ((dvh*(1.0+(((0.5*modelStruct.modelPar_me)*dvh)/(pe_t*(1.0-modelStruct.modelPar_fc)))))*pwq);
}
else
{
{
double value_pow_0 = pow((1.0-(Vbei/pe_t)),(1.0-modelStruct.modelPar_me));
double  deriv_pow_0_d0 = (((1.0-(Vbei/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_me)/(1.0-(Vbei/pe_t))));
double  deriv_pow_0_d1 = ((1.0-(Vbei/pe_t)) == 0.0)?0.0:(log((1.0-(Vbei/pe_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_me)*(pe_t*(-((deriv_pow_0_d0*((-((pe_t*d_Vbei_dX-Vbei*d_pe_t_dX)/pe_t/pe_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_me_dX)))))+d_pe_t_dX*(1.0-value_pow_0))-(pe_t*(1.0-value_pow_0))*(-modelStruct.d_modelPar_me_dX))/(1.0-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_me));
qlo = ((pe_t*(1.0-value_pow_0))/(1.0-modelStruct.modelPar_me));
}
d_qhi_dX = 0.0;
qhi = 0.0;
}
d_qdbe_dX = (d_qlo_dX+d_qhi_dX);
qdbe = (qlo+qhi);
}
else
{
{
double value_sqrt_0 = sqrt(((dv0*dv0)+((4.0*modelStruct.modelPar_aje)*modelStruct.modelPar_aje)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_mv0_dX = deriv_sqrt_0_d0*(((dv0*d_dv0_dX+d_dv0_dX*dv0)+((4.0*modelStruct.modelPar_aje)*modelStruct.d_modelPar_aje_dX+4.0*modelStruct.d_modelPar_aje_dX*modelStruct.modelPar_aje)));
mv0 = value_sqrt_0;
}
d_vl0_dX = (-0.5)*(d_dv0_dX+d_mv0_dX);
vl0 = ((-0.5)*(dv0+mv0));
{
double value_pow_0 = pow((1.0-(vl0/pe_t)),(1.0-modelStruct.modelPar_me));
double  deriv_pow_0_d0 = (((1.0-(vl0/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_me)/(1.0-(vl0/pe_t))));
double  deriv_pow_0_d1 = ((1.0-(vl0/pe_t)) == 0.0)?0.0:(log((1.0-(vl0/pe_t)))*value_pow_0);
d_q0_dX = (((1.0-modelStruct.modelPar_me)*((-pe_t)*((deriv_pow_0_d0*((-((pe_t*d_vl0_dX-vl0*d_pe_t_dX)/pe_t/pe_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_me_dX))))+(-d_pe_t_dX)*value_pow_0)-((-pe_t)*value_pow_0)*(-modelStruct.d_modelPar_me_dX))/(1.0-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_me));
q0 = (((-pe_t)*value_pow_0)/(1.0-modelStruct.modelPar_me));
}
d_dv_dX = (d_Vbei_dX+d_dv0_dX);
dv = (Vbei+dv0);
{
double value_sqrt_0 = sqrt(((dv*dv)+((4.0*modelStruct.modelPar_aje)*modelStruct.modelPar_aje)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_mv_dX = deriv_sqrt_0_d0*(((dv*d_dv_dX+d_dv_dX*dv)+((4.0*modelStruct.modelPar_aje)*modelStruct.d_modelPar_aje_dX+4.0*modelStruct.d_modelPar_aje_dX*modelStruct.modelPar_aje)));
mv = value_sqrt_0;
}
d_vl_dX = (0.5*(d_dv_dX-d_mv_dX)-d_dv0_dX);
vl = ((0.5*(dv-mv))-dv0);
{
double value_pow_0 = pow((1.0-(vl/pe_t)),(1.0-modelStruct.modelPar_me));
double  deriv_pow_0_d0 = (((1.0-(vl/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_me)/(1.0-(vl/pe_t))));
double  deriv_pow_0_d1 = ((1.0-(vl/pe_t)) == 0.0)?0.0:(log((1.0-(vl/pe_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_me)*((-pe_t)*((deriv_pow_0_d0*((-((pe_t*d_vl_dX-vl*d_pe_t_dX)/pe_t/pe_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_me_dX))))+(-d_pe_t_dX)*value_pow_0)-((-pe_t)*value_pow_0)*(-modelStruct.d_modelPar_me_dX))/(1.0-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_me));
qlo = (((-pe_t)*value_pow_0)/(1.0-modelStruct.modelPar_me));
}
{
double value_pow_0 = pow((1.0-modelStruct.modelPar_fc),(-modelStruct.modelPar_me));
double  deriv_pow_0_d0 = (((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_fc)));
double  deriv_pow_0_d1 = ((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(log((1.0-modelStruct.modelPar_fc))*value_pow_0);
d_qdbe_dX = ((d_qlo_dX+((value_pow_0*((Vbei-vl)+vl0))*(((pe_t*(1.0-modelStruct.modelPar_fc))*((0.5*modelStruct.modelPar_me)*((d_Vbei_dX-d_vl_dX)+d_vl0_dX)+0.5*modelStruct.d_modelPar_me_dX*((Vbei-vl)+vl0))-((0.5*modelStruct.modelPar_me)*((Vbei-vl)+vl0))*(pe_t*(-modelStruct.d_modelPar_fc_dX)+d_pe_t_dX*(1.0-modelStruct.modelPar_fc)))/(pe_t*(1.0-modelStruct.modelPar_fc))/(pe_t*(1.0-modelStruct.modelPar_fc)))+(value_pow_0*((d_Vbei_dX-d_vl_dX)+d_vl0_dX)+((deriv_pow_0_d0*((-modelStruct.d_modelPar_fc_dX)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_me_dX))))*((Vbei-vl)+vl0))*(1.0+(((0.5*modelStruct.modelPar_me)*((Vbei-vl)+vl0))/(pe_t*(1.0-modelStruct.modelPar_fc))))))-d_q0_dX);
qdbe = ((qlo+((value_pow_0*((Vbei-vl)+vl0))*(1.0+(((0.5*modelStruct.modelPar_me)*((Vbei-vl)+vl0))/(pe_t*(1.0-modelStruct.modelPar_fc))))))-q0);
}
}
}
// End block qdbeBlock
//Begin block qdbcBlock
{
//Block-local variables for block qdbcBlock
double dv0=0.0;
double d_dv0_dX=0.0;
double dvh=0.0;
double d_dvh_dX=0.0;
double pwq=0.0;
double d_pwq_dX=0.0;
double qlo=0.0;
double d_qlo_dX=0.0;
double qhi=0.0;
double d_qhi_dX=0.0;
double vn0=0.0;
double d_vn0_dX=0.0;
double vnl0=0.0;
double d_vnl0_dX=0.0;
double vl0=0.0;
double d_vl0_dX=0.0;
double qlo0=0.0;
double d_qlo0_dX=0.0;
double vn=0.0;
double d_vn_dX=0.0;
double vnl=0.0;
double d_vnl_dX=0.0;
double vl=0.0;
double d_vl_dX=0.0;
double sel=0.0;
double d_sel_dX=0.0;
double crt=0.0;
double d_crt_dX=0.0;
double cmx=0.0;
double d_cmx_dX=0.0;
double cl=0.0;
double d_cl_dX=0.0;
double ql=0.0;
double d_ql_dX=0.0;
double mv0=0.0;
double d_mv0_dX=0.0;
double q0=0.0;
double d_q0_dX=0.0;
double dv=0.0;
double d_dv_dX=0.0;
double mv=0.0;
double d_mv_dX=0.0;
//End of Block-local variables
d_dv0_dX = ((-pc_t)*modelStruct.d_modelPar_fc_dX+(-d_pc_t_dX)*modelStruct.modelPar_fc);
dv0 = ((-pc_t)*modelStruct.modelPar_fc);
if ((modelStruct.modelPar_ajc<=0.0))
{
d_dvh_dX = (d_Vbci_dX+d_dv0_dX);
dvh = (Vbci+dv0);
if ((dvh>0.0))
{
{
double value_pow_0 = pow((1.0-modelStruct.modelPar_fc),((-1.0)-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(value_pow_0*((-1.0)-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_fc)));
double  deriv_pow_0_d1 = ((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(log((1.0-modelStruct.modelPar_fc))*value_pow_0);
d_pwq_dX = ((deriv_pow_0_d0*((-modelStruct.d_modelPar_fc_dX)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))));
pwq = value_pow_0;
}
d_qlo_dX = (((1.0-modelStruct.modelPar_mc)*(pc_t*(-((pwq*(1.0-modelStruct.modelPar_fc))*(-modelStruct.d_modelPar_fc_dX)+(pwq*(-modelStruct.d_modelPar_fc_dX)+d_pwq_dX*(1.0-modelStruct.modelPar_fc))*(1.0-modelStruct.modelPar_fc)))+d_pc_t_dX*(1.0-((pwq*(1.0-modelStruct.modelPar_fc))*(1.0-modelStruct.modelPar_fc))))-(pc_t*(1.0-((pwq*(1.0-modelStruct.modelPar_fc))*(1.0-modelStruct.modelPar_fc))))*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo = ((pc_t*(1.0-((pwq*(1.0-modelStruct.modelPar_fc))*(1.0-modelStruct.modelPar_fc))))/(1.0-modelStruct.modelPar_mc));
d_qhi_dX = ((dvh*((1.0-modelStruct.modelPar_fc)+(((0.5*modelStruct.modelPar_mc)*dvh)/pc_t)))*d_pwq_dX+(dvh*((-modelStruct.d_modelPar_fc_dX)+((pc_t*((0.5*modelStruct.modelPar_mc)*d_dvh_dX+0.5*modelStruct.d_modelPar_mc_dX*dvh)-((0.5*modelStruct.modelPar_mc)*dvh)*d_pc_t_dX)/pc_t/pc_t))+d_dvh_dX*((1.0-modelStruct.modelPar_fc)+(((0.5*modelStruct.modelPar_mc)*dvh)/pc_t)))*pwq);
qhi = ((dvh*((1.0-modelStruct.modelPar_fc)+(((0.5*modelStruct.modelPar_mc)*dvh)/pc_t)))*pwq);
}
else
{
if (((modelStruct.modelPar_vrt>0.0)&&(Vbci<(-modelStruct.modelPar_vrt))))
{
{
double value_pow_0 = pow((1.0+(modelStruct.modelPar_vrt/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0+(modelStruct.modelPar_vrt/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0+(modelStruct.modelPar_vrt/pc_t))));
double  deriv_pow_0_d1 = ((1.0+(modelStruct.modelPar_vrt/pc_t)) == 0.0)?0.0:(log((1.0+(modelStruct.modelPar_vrt/pc_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_mc)*(pc_t*(-(value_pow_0*(-(((pc_t+modelStruct.modelPar_vrt)*((1.0-modelStruct.modelPar_mc)*(d_Vbci_dX+modelStruct.d_modelPar_vrt_dX)+(-modelStruct.d_modelPar_mc_dX)*(Vbci+modelStruct.modelPar_vrt))-((1.0-modelStruct.modelPar_mc)*(Vbci+modelStruct.modelPar_vrt))*(d_pc_t_dX+modelStruct.d_modelPar_vrt_dX))/(pc_t+modelStruct.modelPar_vrt)/(pc_t+modelStruct.modelPar_vrt)))+((deriv_pow_0_d0*(((pc_t*modelStruct.d_modelPar_vrt_dX-modelStruct.modelPar_vrt*d_pc_t_dX)/pc_t/pc_t)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))))*(1.0-(((1.0-modelStruct.modelPar_mc)*(Vbci+modelStruct.modelPar_vrt))/(pc_t+modelStruct.modelPar_vrt)))))+d_pc_t_dX*(1.0-(value_pow_0*(1.0-(((1.0-modelStruct.modelPar_mc)*(Vbci+modelStruct.modelPar_vrt))/(pc_t+modelStruct.modelPar_vrt))))))-(pc_t*(1.0-(value_pow_0*(1.0-(((1.0-modelStruct.modelPar_mc)*(Vbci+modelStruct.modelPar_vrt))/(pc_t+modelStruct.modelPar_vrt))))))*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo = ((pc_t*(1.0-(value_pow_0*(1.0-(((1.0-modelStruct.modelPar_mc)*(Vbci+modelStruct.modelPar_vrt))/(pc_t+modelStruct.modelPar_vrt))))))/(1.0-modelStruct.modelPar_mc));
}
}
else
{
{
double value_pow_0 = pow((1.0-(Vbci/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-(Vbci/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0-(Vbci/pc_t))));
double  deriv_pow_0_d1 = ((1.0-(Vbci/pc_t)) == 0.0)?0.0:(log((1.0-(Vbci/pc_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_mc)*(pc_t*(-((deriv_pow_0_d0*((-((pc_t*d_Vbci_dX-Vbci*d_pc_t_dX)/pc_t/pc_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX)))))+d_pc_t_dX*(1.0-value_pow_0))-(pc_t*(1.0-value_pow_0))*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo = ((pc_t*(1.0-value_pow_0))/(1.0-modelStruct.modelPar_mc));
}
}
d_qhi_dX = 0.0;
qhi = 0.0;
}
d_qdbc_dX = (d_qlo_dX+d_qhi_dX);
qdbc = (qlo+qhi);
}
else
{
if (((modelStruct.modelPar_vrt>0.0)&&(modelStruct.modelPar_art>0.0)))
{
d_vn0_dX = (((modelStruct.modelPar_vrt-dv0)*(modelStruct.d_modelPar_vrt_dX+d_dv0_dX)-(modelStruct.modelPar_vrt+dv0)*(modelStruct.d_modelPar_vrt_dX-d_dv0_dX))/(modelStruct.modelPar_vrt-dv0)/(modelStruct.modelPar_vrt-dv0));
vn0 = ((modelStruct.modelPar_vrt+dv0)/(modelStruct.modelPar_vrt-dv0));
{
double value_sqrt_0 = sqrt((((vn0-1.0)*(vn0-1))+((4*modelStruct.modelPar_ajc)*modelStruct.modelPar_ajc)));
double value_sqrt_1 = sqrt((((vn0+1.0)*(vn0+1))+((4*modelStruct.modelPar_art)*modelStruct.modelPar_art)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);
d_vnl0_dX = (((value_sqrt_0+value_sqrt_1)*2.0*d_vn0_dX-(2.0*vn0)*(deriv_sqrt_0_d0*((((vn0-1.0)*d_vn0_dX+d_vn0_dX*(vn0-1))+((4*modelStruct.modelPar_ajc)*modelStruct.d_modelPar_ajc_dX+4*modelStruct.d_modelPar_ajc_dX*modelStruct.modelPar_ajc)))+deriv_sqrt_1_d0*((((vn0+1.0)*d_vn0_dX+d_vn0_dX*(vn0+1))+((4*modelStruct.modelPar_art)*modelStruct.d_modelPar_art_dX+4*modelStruct.d_modelPar_art_dX*modelStruct.modelPar_art)))))/(value_sqrt_0+value_sqrt_1)/(value_sqrt_0+value_sqrt_1));
vnl0 = ((2.0*vn0)/(value_sqrt_0+value_sqrt_1));
}
d_vl0_dX = 0.5*(((vnl0*(modelStruct.d_modelPar_vrt_dX-d_dv0_dX)+d_vnl0_dX*(modelStruct.modelPar_vrt-dv0))-modelStruct.d_modelPar_vrt_dX)-d_dv0_dX);
vl0 = (0.5*(((vnl0*(modelStruct.modelPar_vrt-dv0))-modelStruct.modelPar_vrt)-dv0));
{
double value_pow_0 = pow((1.0-(vl0/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-(vl0/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0-(vl0/pc_t))));
double  deriv_pow_0_d1 = ((1.0-(vl0/pc_t)) == 0.0)?0.0:(log((1.0-(vl0/pc_t)))*value_pow_0);
d_qlo0_dX = (((1.0-modelStruct.modelPar_mc)*(pc_t*(-((deriv_pow_0_d0*((-((pc_t*d_vl0_dX-vl0*d_pc_t_dX)/pc_t/pc_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX)))))+d_pc_t_dX*(1.0-value_pow_0))-(pc_t*(1.0-value_pow_0))*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo0 = ((pc_t*(1.0-value_pow_0))/(1.0-modelStruct.modelPar_mc));
}
d_vn_dX = (((modelStruct.modelPar_vrt-dv0)*((2*d_Vbci_dX+modelStruct.d_modelPar_vrt_dX)+d_dv0_dX)-(((2*Vbci)+modelStruct.modelPar_vrt)+dv0)*(modelStruct.d_modelPar_vrt_dX-d_dv0_dX))/(modelStruct.modelPar_vrt-dv0)/(modelStruct.modelPar_vrt-dv0));
vn = ((((2*Vbci)+modelStruct.modelPar_vrt)+dv0)/(modelStruct.modelPar_vrt-dv0));
{
double value_sqrt_0 = sqrt((((vn-1.0)*(vn-1))+((4*modelStruct.modelPar_ajc)*modelStruct.modelPar_ajc)));
double value_sqrt_1 = sqrt((((vn+1.0)*(vn+1))+((4*modelStruct.modelPar_art)*modelStruct.modelPar_art)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);
d_vnl_dX = (((value_sqrt_0+value_sqrt_1)*2.0*d_vn_dX-(2.0*vn)*(deriv_sqrt_0_d0*((((vn-1.0)*d_vn_dX+d_vn_dX*(vn-1))+((4*modelStruct.modelPar_ajc)*modelStruct.d_modelPar_ajc_dX+4*modelStruct.d_modelPar_ajc_dX*modelStruct.modelPar_ajc)))+deriv_sqrt_1_d0*((((vn+1.0)*d_vn_dX+d_vn_dX*(vn+1))+((4*modelStruct.modelPar_art)*modelStruct.d_modelPar_art_dX+4*modelStruct.d_modelPar_art_dX*modelStruct.modelPar_art)))))/(value_sqrt_0+value_sqrt_1)/(value_sqrt_0+value_sqrt_1));
vnl = ((2.0*vn)/(value_sqrt_0+value_sqrt_1));
}
d_vl_dX = 0.5*(((vnl*(modelStruct.d_modelPar_vrt_dX-d_dv0_dX)+d_vnl_dX*(modelStruct.modelPar_vrt-dv0))-modelStruct.d_modelPar_vrt_dX)-d_dv0_dX);
vl = (0.5*(((vnl*(modelStruct.modelPar_vrt-dv0))-modelStruct.modelPar_vrt)-dv0));
{
double value_pow_0 = pow((1.0-(vl/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-(vl/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0-(vl/pc_t))));
double  deriv_pow_0_d1 = ((1.0-(vl/pc_t)) == 0.0)?0.0:(log((1.0-(vl/pc_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_mc)*(pc_t*(-((deriv_pow_0_d0*((-((pc_t*d_vl_dX-vl*d_pc_t_dX)/pc_t/pc_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX)))))+d_pc_t_dX*(1.0-value_pow_0))-(pc_t*(1.0-value_pow_0))*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo = ((pc_t*(1.0-value_pow_0))/(1.0-modelStruct.modelPar_mc));
}
d_sel_dX = 0.5*d_vnl_dX;
sel = (0.5*(vnl+1.0));
{
double value_pow_0 = pow((1.0+(modelStruct.modelPar_vrt/pc_t)),(-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0+(modelStruct.modelPar_vrt/pc_t)) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_mc)/(1.0+(modelStruct.modelPar_vrt/pc_t))));
double  deriv_pow_0_d1 = ((1.0+(modelStruct.modelPar_vrt/pc_t)) == 0.0)?0.0:(log((1.0+(modelStruct.modelPar_vrt/pc_t)))*value_pow_0);
d_crt_dX = ((deriv_pow_0_d0*(((pc_t*modelStruct.d_modelPar_vrt_dX-modelStruct.modelPar_vrt*d_pc_t_dX)/pc_t/pc_t)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))));
crt = value_pow_0;
}
{
double value_pow_0 = pow((1.0+(dv0/pc_t)),(-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0+(dv0/pc_t)) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_mc)/(1.0+(dv0/pc_t))));
double  deriv_pow_0_d1 = ((1.0+(dv0/pc_t)) == 0.0)?0.0:(log((1.0+(dv0/pc_t)))*value_pow_0);
d_cmx_dX = ((deriv_pow_0_d0*(((pc_t*d_dv0_dX-dv0*d_pc_t_dX)/pc_t/pc_t)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))));
cmx = value_pow_0;
}
d_cl_dX = (((1.0-sel)*d_crt_dX+(-d_sel_dX)*crt)+(sel*d_cmx_dX+d_sel_dX*cmx));
cl = (((1.0-sel)*crt)+(sel*cmx));
d_ql_dX = (((Vbci-vl)+vl0)*d_cl_dX+((d_Vbci_dX-d_vl_dX)+d_vl0_dX)*cl);
ql = (((Vbci-vl)+vl0)*cl);
d_qdbc_dX = ((d_ql_dX+d_qlo_dX)-d_qlo0_dX);
qdbc = ((ql+qlo)-qlo0);
}
else
{
{
double value_sqrt_0 = sqrt(((dv0*dv0)+((4*modelStruct.modelPar_ajc)*modelStruct.modelPar_ajc)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_mv0_dX = deriv_sqrt_0_d0*(((dv0*d_dv0_dX+d_dv0_dX*dv0)+((4*modelStruct.modelPar_ajc)*modelStruct.d_modelPar_ajc_dX+4*modelStruct.d_modelPar_ajc_dX*modelStruct.modelPar_ajc)));
mv0 = value_sqrt_0;
}
d_vl0_dX = (-0.5)*(d_dv0_dX+d_mv0_dX);
vl0 = ((-0.5)*(dv0+mv0));
{
double value_pow_0 = pow((1.0-(vl0/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-(vl0/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0-(vl0/pc_t))));
double  deriv_pow_0_d1 = ((1.0-(vl0/pc_t)) == 0.0)?0.0:(log((1.0-(vl0/pc_t)))*value_pow_0);
d_q0_dX = (((1.0-modelStruct.modelPar_mc)*((-pc_t)*((deriv_pow_0_d0*((-((pc_t*d_vl0_dX-vl0*d_pc_t_dX)/pc_t/pc_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))))+(-d_pc_t_dX)*value_pow_0)-((-pc_t)*value_pow_0)*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
q0 = (((-pc_t)*value_pow_0)/(1.0-modelStruct.modelPar_mc));
}
d_dv_dX = (d_Vbci_dX+d_dv0_dX);
dv = (Vbci+dv0);
{
double value_sqrt_0 = sqrt(((dv*dv)+((4*modelStruct.modelPar_ajc)*modelStruct.modelPar_ajc)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_mv_dX = deriv_sqrt_0_d0*(((dv*d_dv_dX+d_dv_dX*dv)+((4*modelStruct.modelPar_ajc)*modelStruct.d_modelPar_ajc_dX+4*modelStruct.d_modelPar_ajc_dX*modelStruct.modelPar_ajc)));
mv = value_sqrt_0;
}
d_vl_dX = (0.5*(d_dv_dX-d_mv_dX)-d_dv0_dX);
vl = ((0.5*(dv-mv))-dv0);
{
double value_pow_0 = pow((1.0-(vl/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-(vl/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0-(vl/pc_t))));
double  deriv_pow_0_d1 = ((1.0-(vl/pc_t)) == 0.0)?0.0:(log((1.0-(vl/pc_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_mc)*((-pc_t)*((deriv_pow_0_d0*((-((pc_t*d_vl_dX-vl*d_pc_t_dX)/pc_t/pc_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))))+(-d_pc_t_dX)*value_pow_0)-((-pc_t)*value_pow_0)*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo = (((-pc_t)*value_pow_0)/(1.0-modelStruct.modelPar_mc));
}
{
double value_pow_0 = pow((1.0-modelStruct.modelPar_fc),(-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_fc)));
double  deriv_pow_0_d1 = ((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(log((1.0-modelStruct.modelPar_fc))*value_pow_0);
d_qdbc_dX = ((d_qlo_dX+(value_pow_0*((d_Vbci_dX-d_vl_dX)+d_vl0_dX)+((deriv_pow_0_d0*((-modelStruct.d_modelPar_fc_dX)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))))*((Vbci-vl)+vl0)))-d_q0_dX);
qdbc = ((qlo+(value_pow_0*((Vbci-vl)+vl0)))-q0);
}
}
}
}
// End block qdbcBlock
d_afac_dX = (-(nf_t*instanceStruct.d_instanceVar_vtv_dX+d_nf_t_dX*instanceStruct.instanceVar_vtv)/(nf_t*instanceStruct.instanceVar_vtv)/(nf_t*instanceStruct.instanceVar_vtv));
afac = (1.0/(nf_t*instanceStruct.instanceVar_vtv));
if ((Vbei<instanceStruct.instanceVar_maxvIfi))
{
{
double value_exp_0 = exp((Vbei*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*((Vbei*d_afac_dX+d_Vbei_dX*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIfi*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*((Vbei-instanceStruct.instanceVar_maxvIfi)*d_afac_dX+(d_Vbei_dX-instanceStruct.d_instanceVar_maxvIfi_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIfi*d_afac_dX+instanceStruct.d_instanceVar_maxvIfi_dX*afac))*(1.0+((Vbei-instanceStruct.instanceVar_maxvIfi)*afac)));
expi = (value_exp_0*(1.0+((Vbei-instanceStruct.instanceVar_maxvIfi)*afac)));
}
}
d_Ifi_dX = (instanceStruct.instanceVar_is_t*d_expi_dX+instanceStruct.d_instanceVar_is_t_dX*(expi-1.0));
Ifi = (instanceStruct.instanceVar_is_t*(expi-1.0));
d_afac_dX = (-(nr_t*instanceStruct.d_instanceVar_vtv_dX+d_nr_t_dX*instanceStruct.instanceVar_vtv)/(nr_t*instanceStruct.instanceVar_vtv)/(nr_t*instanceStruct.instanceVar_vtv));
afac = (1.0/(nr_t*instanceStruct.instanceVar_vtv));
if ((Vbci<instanceStruct.instanceVar_maxvIri))
{
{
double value_exp_0 = exp((Vbci*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*((Vbci*d_afac_dX+d_Vbci_dX*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIri*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*((Vbci-instanceStruct.instanceVar_maxvIri)*d_afac_dX+(d_Vbci_dX-instanceStruct.d_instanceVar_maxvIri_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIri*d_afac_dX+instanceStruct.d_instanceVar_maxvIri_dX*afac))*(1.0+((Vbci-instanceStruct.instanceVar_maxvIri)*afac)));
expi = (value_exp_0*(1.0+((Vbci-instanceStruct.instanceVar_maxvIri)*afac)));
}
}
d_Iri_dX = ((instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t)*d_expi_dX+(instanceStruct.instanceVar_is_t*instanceStruct.d_instanceVar_isrr_t_dX+instanceStruct.d_instanceVar_is_t_dX*instanceStruct.instanceVar_isrr_t)*(expi-1.0));
Iri = ((instanceStruct.instanceVar_is_t*instanceStruct.instanceVar_isrr_t)*(expi-1.0));
d_q1z_dX = ((qdbe*d_Iver_dX+d_qdbe_dX*Iver)+(qdbc*d_Ivef_dX+d_qdbc_dX*Ivef));
q1z = (((1.0+(qdbe*Iver))+(qdbc*Ivef))-1.0e-4);
{
double value_sqrt_0 = sqrt(((q1z*q1z)+1.0e-8));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_q1_dX = 0.5*(deriv_sqrt_0_d0*((q1z*d_q1z_dX+d_q1z_dX*q1z))+d_q1z_dX);
q1 = ((0.5*(value_sqrt_0+q1z))+1.0e-4);
}
d_q2_dX = ((Ifi*d_Iikf_dX+d_Ifi_dX*Iikf)+(Iri*modelStruct.d_modelVar_Iikr_dX+d_Iri_dX*modelStruct.modelVar_Iikr));
q2 = ((Ifi*Iikf)+(Iri*modelStruct.modelVar_Iikr));
if ((modelStruct.modelPar_qbm<0.5))
{
{
double value_pow_0 = pow(q1,(1.0/modelStruct.modelPar_nkf));
double  deriv_pow_0_d0 = ((q1 == 0.0)?0.0:(value_pow_0*(1.0/modelStruct.modelPar_nkf)/q1));
double  deriv_pow_0_d1 = (q1 == 0.0)?0.0:(log(q1)*value_pow_0);
d_arg_dX = (((deriv_pow_0_d0*(d_q1_dX))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_nkf_dX/modelStruct.modelPar_nkf/modelStruct.modelPar_nkf))))+4.0*d_q2_dX);
arg = (value_pow_0+(4.0*q2));
}
if ((arg>1.0e-8))
{
{
double value_pow_0 = pow(arg,modelStruct.modelPar_nkf);
double  deriv_pow_0_d0 = ((arg == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_nkf/arg));
double  deriv_pow_0_d1 = (arg == 0.0)?0.0:(log(arg)*value_pow_0);
instanceStruct.d_instanceVar_qb_dX = 0.5*(d_q1_dX+((deriv_pow_0_d0*(d_arg_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_nkf_dX))));
instanceStruct.instanceVar_qb = (0.5*(q1+value_pow_0));
}
}
else
{
{
double value_pow_0 = pow(1.0e-8,modelStruct.modelPar_nkf);
double  deriv_pow_0_d1 = (1.0e-8 == 0.0)?0.0:(log(1.0e-8)*value_pow_0);
instanceStruct.d_instanceVar_qb_dX = 0.5*(d_q1_dX+(deriv_pow_0_d1*(modelStruct.d_modelPar_nkf_dX)));
instanceStruct.instanceVar_qb = (0.5*(q1+value_pow_0));
}
}
}
else
{
d_arg_dX = 4.0*d_q2_dX;
arg = (1.0+(4.0*q2));
if ((arg>1.0e-8))
{
{
double value_pow_0 = pow(arg,modelStruct.modelPar_nkf);
double  deriv_pow_0_d0 = ((arg == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_nkf/arg));
double  deriv_pow_0_d1 = (arg == 0.0)?0.0:(log(arg)*value_pow_0);
instanceStruct.d_instanceVar_qb_dX = ((0.5*q1)*((deriv_pow_0_d0*(d_arg_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_nkf_dX)))+0.5*d_q1_dX*(1.0+value_pow_0));
instanceStruct.instanceVar_qb = ((0.5*q1)*(1.0+value_pow_0));
}
}
else
{
{
double value_pow_0 = pow(1.0e-8,modelStruct.modelPar_nkf);
double  deriv_pow_0_d1 = (1.0e-8 == 0.0)?0.0:(log(1.0e-8)*value_pow_0);
instanceStruct.d_instanceVar_qb_dX = ((0.5*q1)*(deriv_pow_0_d1*(modelStruct.d_modelPar_nkf_dX))+0.5*d_q1_dX*(1.0+value_pow_0));
instanceStruct.instanceVar_qb = ((0.5*q1)*(1.0+value_pow_0));
}
}
}
d_Itzr_dX = ((instanceStruct.instanceVar_qb*d_Iri_dX-Iri*instanceStruct.d_instanceVar_qb_dX)/instanceStruct.instanceVar_qb/instanceStruct.instanceVar_qb);
Itzr = (Iri/instanceStruct.instanceVar_qb);
instanceStruct.d_instanceVar_Itzf_dX = ((instanceStruct.instanceVar_qb*d_Ifi_dX-Ifi*instanceStruct.d_instanceVar_qb_dX)/instanceStruct.instanceVar_qb/instanceStruct.instanceVar_qb);
instanceStruct.instanceVar_Itzf = (Ifi/instanceStruct.instanceVar_qb);
d_Itxf_dX = 0.0;
Itxf = Vxf2;
if ((modelStruct.modelPar_isp>0.0))
{
d_afac_dX = (-(modelStruct.modelPar_nfp*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nfp_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nfp*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nfp*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_nfp*instanceStruct.instanceVar_vtv));
if ((Vbep<instanceStruct.instanceVar_maxvIp))
{
{
double value_exp_0 = exp((Vbep*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*((Vbep*d_afac_dX+d_Vbep_dX*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIp*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*((Vbep-instanceStruct.instanceVar_maxvIp)*d_afac_dX+(d_Vbep_dX-instanceStruct.d_instanceVar_maxvIp_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIp*d_afac_dX+instanceStruct.d_instanceVar_maxvIp_dX*afac))*(1.0+((Vbep-instanceStruct.instanceVar_maxvIp)*afac)));
expi = (value_exp_0*(1.0+((Vbep-instanceStruct.instanceVar_maxvIp)*afac)));
}
}
if ((Vbci<instanceStruct.instanceVar_maxvIp))
{
{
double value_exp_0 = exp((Vbci*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = deriv_exp_0_d0*((Vbci*d_afac_dX+d_Vbci_dX*afac));
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIp*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = (value_exp_0*((Vbci-instanceStruct.instanceVar_maxvIp)*d_afac_dX+(d_Vbci_dX-instanceStruct.d_instanceVar_maxvIp_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIp*d_afac_dX+instanceStruct.d_instanceVar_maxvIp_dX*afac))*(1.0+((Vbci-instanceStruct.instanceVar_maxvIp)*afac)));
expx = (value_exp_0*(1.0+((Vbci-instanceStruct.instanceVar_maxvIp)*afac)));
}
}
d_Ifp_dX = (instanceStruct.instanceVar_isp_t*((modelStruct.modelPar_wsp*d_expi_dX+modelStruct.d_modelPar_wsp_dX*expi)+((1.0-modelStruct.modelPar_wsp)*d_expx_dX+(-modelStruct.d_modelPar_wsp_dX)*expx))+instanceStruct.d_instanceVar_isp_t_dX*(((modelStruct.modelPar_wsp*expi)+((1.0-modelStruct.modelPar_wsp)*expx))-1.0));
Ifp = (instanceStruct.instanceVar_isp_t*(((modelStruct.modelPar_wsp*expi)+((1.0-modelStruct.modelPar_wsp)*expx))-1.0));
d_q2p_dX = (Ifp*modelStruct.d_modelVar_Iikp_dX+d_Ifp_dX*modelStruct.modelVar_Iikp);
q2p = (Ifp*modelStruct.modelVar_Iikp);
d_arg_dX = 4.0*d_q2p_dX;
arg = (1.0+(4.0*q2p));
if ((arg>1.0e-8))
{
{
double value_sqrt_0 = sqrt(arg);
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
instanceStruct.d_instanceVar_qbp_dX = 0.5*deriv_sqrt_0_d0*(d_arg_dX);
instanceStruct.instanceVar_qbp = (0.5*(1.0+value_sqrt_0));
}
}
else
{
{
double value_sqrt_0 = sqrt(static_cast<double>(1.0e-8));
instanceStruct.d_instanceVar_qbp_dX = 0.0;
instanceStruct.instanceVar_qbp = (0.5*(1.0+value_sqrt_0));
}
}
if ((Vbcp<instanceStruct.instanceVar_maxvIp))
{
{
double value_exp_0 = exp((Vbcp*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*((Vbcp*d_afac_dX+d_Vbcp_dX*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIp*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*((Vbcp-instanceStruct.instanceVar_maxvIp)*d_afac_dX+(d_Vbcp_dX-instanceStruct.d_instanceVar_maxvIp_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIp*d_afac_dX+instanceStruct.d_instanceVar_maxvIp_dX*afac))*(1.0+((Vbcp-instanceStruct.instanceVar_maxvIp)*afac)));
expi = (value_exp_0*(1.0+((Vbcp-instanceStruct.instanceVar_maxvIp)*afac)));
}
}
d_Irp_dX = (instanceStruct.instanceVar_isp_t*d_expi_dX+instanceStruct.d_instanceVar_isp_t_dX*(expi-1.0));
Irp = (instanceStruct.instanceVar_isp_t*(expi-1.0));
instanceStruct.d_instanceVar_Iccp_dX = ((instanceStruct.instanceVar_qbp*(d_Ifp_dX-d_Irp_dX)-(Ifp-Irp)*instanceStruct.d_instanceVar_qbp_dX)/instanceStruct.instanceVar_qbp/instanceStruct.instanceVar_qbp);
instanceStruct.instanceVar_Iccp = ((Ifp-Irp)/instanceStruct.instanceVar_qbp);
}
else
{
d_Ifp_dX = 0.0;
Ifp = 0.0;
instanceStruct.d_instanceVar_qbp_dX = 0.0;
instanceStruct.instanceVar_qbp = 1.0;
instanceStruct.d_instanceVar_Iccp_dX = 0.0;
instanceStruct.instanceVar_Iccp = 0.0;
}
if ((modelStruct.modelPar_wbe==1.0))
{
d_afac_dX = (-(modelStruct.modelPar_nei*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nei_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv));
if ((Vbei<instanceStruct.instanceVar_maxvIbei))
{
{
double value_exp_0 = exp((Vbei*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*((Vbei*d_afac_dX+d_Vbei_dX*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbei*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*((Vbei-instanceStruct.instanceVar_maxvIbei)*d_afac_dX+(d_Vbei_dX-instanceStruct.d_instanceVar_maxvIbei_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbei*d_afac_dX+instanceStruct.d_instanceVar_maxvIbei_dX*afac))*(1.0+((Vbei-instanceStruct.instanceVar_maxvIbei)*afac)));
expi = (value_exp_0*(1.0+((Vbei-instanceStruct.instanceVar_maxvIbei)*afac)));
}
}
d_afac_dX = (-(modelStruct.modelPar_nen*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nen_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv));
if ((Vbei<instanceStruct.instanceVar_maxvIben))
{
{
double value_exp_0 = exp((Vbei*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = deriv_exp_0_d0*((Vbei*d_afac_dX+d_Vbei_dX*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIben*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = (value_exp_0*((Vbei-instanceStruct.instanceVar_maxvIben)*d_afac_dX+(d_Vbei_dX-instanceStruct.d_instanceVar_maxvIben_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIben*d_afac_dX+instanceStruct.d_instanceVar_maxvIben_dX*afac))*(1.0+((Vbei-instanceStruct.instanceVar_maxvIben)*afac)));
expn = (value_exp_0*(1.0+((Vbei-instanceStruct.instanceVar_maxvIben)*afac)));
}
}
if ((modelStruct.modelPar_qnibeir>0.0))
{
instanceStruct.d_instanceVar_Ibe_dX = (((instanceStruct.instanceVar_ibei_t*(1.0+(modelStruct.modelPar_qnibeir*(q1-1.0))))*d_expi_dX+(instanceStruct.instanceVar_ibei_t*(modelStruct.modelPar_qnibeir*d_q1_dX+modelStruct.d_modelPar_qnibeir_dX*(q1-1.0))+instanceStruct.d_instanceVar_ibei_t_dX*(1.0+(modelStruct.modelPar_qnibeir*(q1-1.0))))*(expi-1.0))+(instanceStruct.instanceVar_iben_t*d_expn_dX+instanceStruct.d_instanceVar_iben_t_dX*(expn-1.0)));
instanceStruct.instanceVar_Ibe = (((instanceStruct.instanceVar_ibei_t*(1.0+(modelStruct.modelPar_qnibeir*(q1-1.0))))*(expi-1.0))+(instanceStruct.instanceVar_iben_t*(expn-1.0)));
}
else
{
instanceStruct.d_instanceVar_Ibe_dX = ((instanceStruct.instanceVar_ibei_t*d_expi_dX+instanceStruct.d_instanceVar_ibei_t_dX*(expi-1.0))+(instanceStruct.instanceVar_iben_t*d_expn_dX+instanceStruct.d_instanceVar_iben_t_dX*(expn-1.0)));
instanceStruct.instanceVar_Ibe = ((instanceStruct.instanceVar_ibei_t*(expi-1.0))+(instanceStruct.instanceVar_iben_t*(expn-1.0)));
}
if ((modelStruct.modelPar_vbbe>0.0))
{
d_Bvbe_dX = ((-d_vbbe_t_dX)-d_Vbei_dX);
Bvbe = ((-vbbe_t)-Vbei);
d_afac_dX = (-(nbbe_t*instanceStruct.d_instanceVar_vtv_dX+d_nbbe_t_dX*instanceStruct.instanceVar_vtv)/(nbbe_t*instanceStruct.instanceVar_vtv)/(nbbe_t*instanceStruct.instanceVar_vtv));
afac = (1.0/(nbbe_t*instanceStruct.instanceVar_vtv));
if ((Bvbe<instanceStruct.instanceVar_maxvIbbe))
{
{
double value_exp_0 = exp((Bvbe*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = deriv_exp_0_d0*((Bvbe*d_afac_dX+d_Bvbe_dX*afac));
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbbe*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = (value_exp_0*((Bvbe-instanceStruct.instanceVar_maxvIbbe)*d_afac_dX+(d_Bvbe_dX-instanceStruct.d_instanceVar_maxvIbbe_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbbe*d_afac_dX+instanceStruct.d_instanceVar_maxvIbbe_dX*afac))*(1.0+((Bvbe-instanceStruct.instanceVar_maxvIbbe)*afac)));
expx = (value_exp_0*(1.0+((Bvbe-instanceStruct.instanceVar_maxvIbbe)*afac)));
}
}
instanceStruct.d_instanceVar_Ibe_dX = (instanceStruct.d_instanceVar_Ibe_dX-(modelStruct.modelPar_ibbe*(d_expx_dX-d_ebbe_t_dX)+modelStruct.d_modelPar_ibbe_dX*(expx-ebbe_t)));
instanceStruct.instanceVar_Ibe = (instanceStruct.instanceVar_Ibe-(modelStruct.modelPar_ibbe*(expx-ebbe_t)));
}
instanceStruct.d_instanceVar_Ibex_dX = 0.0;
instanceStruct.instanceVar_Ibex = 0.0;
}
else
{
if ((modelStruct.modelPar_wbe==0.0))
{
instanceStruct.d_instanceVar_Ibe_dX = 0.0;
instanceStruct.instanceVar_Ibe = 0.0;
d_afac_dX = (-(modelStruct.modelPar_nei*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nei_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv));
if ((Vbex<instanceStruct.instanceVar_maxvIbei))
{
{
double value_exp_0 = exp((Vbex*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*((Vbex*d_afac_dX+d_Vbex_dX*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbei*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*((Vbex-instanceStruct.instanceVar_maxvIbei)*d_afac_dX+(d_Vbex_dX-instanceStruct.d_instanceVar_maxvIbei_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbei*d_afac_dX+instanceStruct.d_instanceVar_maxvIbei_dX*afac))*(1.0+((Vbex-instanceStruct.instanceVar_maxvIbei)*afac)));
expi = (value_exp_0*(1.0+((Vbex-instanceStruct.instanceVar_maxvIbei)*afac)));
}
}
d_afac_dX = (-(modelStruct.modelPar_nen*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nen_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv));
if ((Vbex<instanceStruct.instanceVar_maxvIben))
{
{
double value_exp_0 = exp((Vbex*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = deriv_exp_0_d0*((Vbex*d_afac_dX+d_Vbex_dX*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIben*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = (value_exp_0*((Vbex-instanceStruct.instanceVar_maxvIben)*d_afac_dX+(d_Vbex_dX-instanceStruct.d_instanceVar_maxvIben_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIben*d_afac_dX+instanceStruct.d_instanceVar_maxvIben_dX*afac))*(1.0+((Vbex-instanceStruct.instanceVar_maxvIben)*afac)));
expn = (value_exp_0*(1.0+((Vbex-instanceStruct.instanceVar_maxvIben)*afac)));
}
}
instanceStruct.d_instanceVar_Ibex_dX = ((instanceStruct.instanceVar_ibei_t*d_expi_dX+instanceStruct.d_instanceVar_ibei_t_dX*(expi-1.0))+(instanceStruct.instanceVar_iben_t*d_expn_dX+instanceStruct.d_instanceVar_iben_t_dX*(expn-1.0)));
instanceStruct.instanceVar_Ibex = ((instanceStruct.instanceVar_ibei_t*(expi-1.0))+(instanceStruct.instanceVar_iben_t*(expn-1.0)));
if ((modelStruct.modelPar_vbbe>0.0))
{
d_Bvbe_dX = ((-d_vbbe_t_dX)-d_Vbei_dX);
Bvbe = ((-vbbe_t)-Vbei);
d_afac_dX = (-(nbbe_t*instanceStruct.d_instanceVar_vtv_dX+d_nbbe_t_dX*instanceStruct.instanceVar_vtv)/(nbbe_t*instanceStruct.instanceVar_vtv)/(nbbe_t*instanceStruct.instanceVar_vtv));
afac = (1.0/(nbbe_t*instanceStruct.instanceVar_vtv));
if ((Bvbe<instanceStruct.instanceVar_maxvIbbe))
{
{
double value_exp_0 = exp((Bvbe*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = deriv_exp_0_d0*((Bvbe*d_afac_dX+d_Bvbe_dX*afac));
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbbe*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = (value_exp_0*((Bvbe-instanceStruct.instanceVar_maxvIbbe)*d_afac_dX+(d_Bvbe_dX-instanceStruct.d_instanceVar_maxvIbbe_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbbe*d_afac_dX+instanceStruct.d_instanceVar_maxvIbbe_dX*afac))*(1.0+((Bvbe-instanceStruct.instanceVar_maxvIbbe)*afac)));
expx = (value_exp_0*(1.0+((Bvbe-instanceStruct.instanceVar_maxvIbbe)*afac)));
}
}
instanceStruct.d_instanceVar_Ibex_dX = (instanceStruct.d_instanceVar_Ibex_dX-(modelStruct.modelPar_ibbe*(d_expx_dX-d_ebbe_t_dX)+modelStruct.d_modelPar_ibbe_dX*(expx-ebbe_t)));
instanceStruct.instanceVar_Ibex = (instanceStruct.instanceVar_Ibex-(modelStruct.modelPar_ibbe*(expx-ebbe_t)));
}
}
else
{
d_afac_dX = (-(modelStruct.modelPar_nei*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nei_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv));
if ((Vbei<instanceStruct.instanceVar_maxvIbei))
{
{
double value_exp_0 = exp((Vbei*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*((Vbei*d_afac_dX+d_Vbei_dX*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbei*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*((Vbei-instanceStruct.instanceVar_maxvIbei)*d_afac_dX+(d_Vbei_dX-instanceStruct.d_instanceVar_maxvIbei_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbei*d_afac_dX+instanceStruct.d_instanceVar_maxvIbei_dX*afac))*(1.0+((Vbei-instanceStruct.instanceVar_maxvIbei)*afac)));
expi = (value_exp_0*(1.0+((Vbei-instanceStruct.instanceVar_maxvIbei)*afac)));
}
}
d_afac_dX = (-(modelStruct.modelPar_nen*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nen_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv));
if ((Vbei<instanceStruct.instanceVar_maxvIben))
{
{
double value_exp_0 = exp((Vbei*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = deriv_exp_0_d0*((Vbei*d_afac_dX+d_Vbei_dX*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIben*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = (value_exp_0*((Vbei-instanceStruct.instanceVar_maxvIben)*d_afac_dX+(d_Vbei_dX-instanceStruct.d_instanceVar_maxvIben_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIben*d_afac_dX+instanceStruct.d_instanceVar_maxvIben_dX*afac))*(1.0+((Vbei-instanceStruct.instanceVar_maxvIben)*afac)));
expn = (value_exp_0*(1.0+((Vbei-instanceStruct.instanceVar_maxvIben)*afac)));
}
}
if ((modelStruct.modelPar_qnibeir>0.0))
{
instanceStruct.d_instanceVar_Ibe_dX = (modelStruct.modelPar_wbe*(((instanceStruct.instanceVar_ibei_t*(1.0+(modelStruct.modelPar_qnibeir*(q1-1.0))))*d_expi_dX+(instanceStruct.instanceVar_ibei_t*(modelStruct.modelPar_qnibeir*d_q1_dX+modelStruct.d_modelPar_qnibeir_dX*(q1-1.0))+instanceStruct.d_instanceVar_ibei_t_dX*(1.0+(modelStruct.modelPar_qnibeir*(q1-1.0))))*(expi-1.0))+(instanceStruct.instanceVar_iben_t*d_expn_dX+instanceStruct.d_instanceVar_iben_t_dX*(expn-1.0)))+modelStruct.d_modelPar_wbe_dX*(((instanceStruct.instanceVar_ibei_t*(1.0+(modelStruct.modelPar_qnibeir*(q1-1.0))))*(expi-1.0))+(instanceStruct.instanceVar_iben_t*(expn-1.0))));
instanceStruct.instanceVar_Ibe = (modelStruct.modelPar_wbe*(((instanceStruct.instanceVar_ibei_t*(1.0+(modelStruct.modelPar_qnibeir*(q1-1.0))))*(expi-1.0))+(instanceStruct.instanceVar_iben_t*(expn-1.0))));
}
else
{
instanceStruct.d_instanceVar_Ibe_dX = (modelStruct.modelPar_wbe*((instanceStruct.instanceVar_ibei_t*d_expi_dX+instanceStruct.d_instanceVar_ibei_t_dX*(expi-1.0))+(instanceStruct.instanceVar_iben_t*d_expn_dX+instanceStruct.d_instanceVar_iben_t_dX*(expn-1.0)))+modelStruct.d_modelPar_wbe_dX*((instanceStruct.instanceVar_ibei_t*(expi-1.0))+(instanceStruct.instanceVar_iben_t*(expn-1.0))));
instanceStruct.instanceVar_Ibe = (modelStruct.modelPar_wbe*((instanceStruct.instanceVar_ibei_t*(expi-1.0))+(instanceStruct.instanceVar_iben_t*(expn-1.0))));
}
if ((modelStruct.modelPar_vbbe>0.0))
{
d_Bvbe_dX = ((-d_vbbe_t_dX)-d_Vbei_dX);
Bvbe = ((-vbbe_t)-Vbei);
d_afac_dX = (-(nbbe_t*instanceStruct.d_instanceVar_vtv_dX+d_nbbe_t_dX*instanceStruct.instanceVar_vtv)/(nbbe_t*instanceStruct.instanceVar_vtv)/(nbbe_t*instanceStruct.instanceVar_vtv));
afac = (1.0/(nbbe_t*instanceStruct.instanceVar_vtv));
if ((Bvbe<instanceStruct.instanceVar_maxvIbbe))
{
{
double value_exp_0 = exp((Bvbe*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = deriv_exp_0_d0*((Bvbe*d_afac_dX+d_Bvbe_dX*afac));
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbbe*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = (value_exp_0*((Bvbe-instanceStruct.instanceVar_maxvIbbe)*d_afac_dX+(d_Bvbe_dX-instanceStruct.d_instanceVar_maxvIbbe_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbbe*d_afac_dX+instanceStruct.d_instanceVar_maxvIbbe_dX*afac))*(1.0+((Bvbe-instanceStruct.instanceVar_maxvIbbe)*afac)));
expx = (value_exp_0*(1.0+((Bvbe-instanceStruct.instanceVar_maxvIbbe)*afac)));
}
}
instanceStruct.d_instanceVar_Ibe_dX = (instanceStruct.d_instanceVar_Ibe_dX-((modelStruct.modelPar_wbe*modelStruct.modelPar_ibbe)*(d_expx_dX-d_ebbe_t_dX)+(modelStruct.modelPar_wbe*modelStruct.d_modelPar_ibbe_dX+modelStruct.d_modelPar_wbe_dX*modelStruct.modelPar_ibbe)*(expx-ebbe_t)));
instanceStruct.instanceVar_Ibe = (instanceStruct.instanceVar_Ibe-((modelStruct.modelPar_wbe*modelStruct.modelPar_ibbe)*(expx-ebbe_t)));
}
d_afac_dX = (-(modelStruct.modelPar_nei*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nei_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_nei*instanceStruct.instanceVar_vtv));
if ((Vbex<instanceStruct.instanceVar_maxvIbei))
{
{
double value_exp_0 = exp((Vbex*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*((Vbex*d_afac_dX+d_Vbex_dX*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbei*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*((Vbex-instanceStruct.instanceVar_maxvIbei)*d_afac_dX+(d_Vbex_dX-instanceStruct.d_instanceVar_maxvIbei_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbei*d_afac_dX+instanceStruct.d_instanceVar_maxvIbei_dX*afac))*(1.0+((Vbex-instanceStruct.instanceVar_maxvIbei)*afac)));
expi = (value_exp_0*(1.0+((Vbex-instanceStruct.instanceVar_maxvIbei)*afac)));
}
}
d_afac_dX = (-(modelStruct.modelPar_nen*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nen_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_nen*instanceStruct.instanceVar_vtv));
if ((Vbex<instanceStruct.instanceVar_maxvIben))
{
{
double value_exp_0 = exp((Vbex*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = deriv_exp_0_d0*((Vbex*d_afac_dX+d_Vbex_dX*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIben*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = (value_exp_0*((Vbex-instanceStruct.instanceVar_maxvIben)*d_afac_dX+(d_Vbex_dX-instanceStruct.d_instanceVar_maxvIben_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIben*d_afac_dX+instanceStruct.d_instanceVar_maxvIben_dX*afac))*(1.0+((Vbex-instanceStruct.instanceVar_maxvIben)*afac)));
expn = (value_exp_0*(1.0+((Vbex-instanceStruct.instanceVar_maxvIben)*afac)));
}
}
instanceStruct.d_instanceVar_Ibex_dX = ((1.0-modelStruct.modelPar_wbe)*((instanceStruct.instanceVar_ibei_t*d_expi_dX+instanceStruct.d_instanceVar_ibei_t_dX*(expi-1.0))+(instanceStruct.instanceVar_iben_t*d_expn_dX+instanceStruct.d_instanceVar_iben_t_dX*(expn-1.0)))+(-modelStruct.d_modelPar_wbe_dX)*((instanceStruct.instanceVar_ibei_t*(expi-1.0))+(instanceStruct.instanceVar_iben_t*(expn-1.0))));
instanceStruct.instanceVar_Ibex = ((1.0-modelStruct.modelPar_wbe)*((instanceStruct.instanceVar_ibei_t*(expi-1.0))+(instanceStruct.instanceVar_iben_t*(expn-1.0))));
if ((modelStruct.modelPar_vbbe>0.0))
{
d_Bvbe_dX = ((-d_vbbe_t_dX)-d_Vbei_dX);
Bvbe = ((-vbbe_t)-Vbei);
d_afac_dX = (-(nbbe_t*instanceStruct.d_instanceVar_vtv_dX+d_nbbe_t_dX*instanceStruct.instanceVar_vtv)/(nbbe_t*instanceStruct.instanceVar_vtv)/(nbbe_t*instanceStruct.instanceVar_vtv));
afac = (1.0/(nbbe_t*instanceStruct.instanceVar_vtv));
if ((Bvbe<instanceStruct.instanceVar_maxvIbbe))
{
{
double value_exp_0 = exp((Bvbe*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = deriv_exp_0_d0*((Bvbe*d_afac_dX+d_Bvbe_dX*afac));
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbbe*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = (value_exp_0*((Bvbe-instanceStruct.instanceVar_maxvIbbe)*d_afac_dX+(d_Bvbe_dX-instanceStruct.d_instanceVar_maxvIbbe_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbbe*d_afac_dX+instanceStruct.d_instanceVar_maxvIbbe_dX*afac))*(1.0+((Bvbe-instanceStruct.instanceVar_maxvIbbe)*afac)));
expx = (value_exp_0*(1.0+((Bvbe-instanceStruct.instanceVar_maxvIbbe)*afac)));
}
}
instanceStruct.d_instanceVar_Ibex_dX = (instanceStruct.d_instanceVar_Ibex_dX-(((1.0-modelStruct.modelPar_wbe)*modelStruct.modelPar_ibbe)*(d_expx_dX-d_ebbe_t_dX)+((1.0-modelStruct.modelPar_wbe)*modelStruct.d_modelPar_ibbe_dX+(-modelStruct.d_modelPar_wbe_dX)*modelStruct.modelPar_ibbe)*(expx-ebbe_t)));
instanceStruct.instanceVar_Ibex = (instanceStruct.instanceVar_Ibex-(((1.0-modelStruct.modelPar_wbe)*modelStruct.modelPar_ibbe)*(expx-ebbe_t)));
}
}
}
d_afac_dX = (-(modelStruct.modelPar_nci*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nci_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nci*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nci*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_nci*instanceStruct.instanceVar_vtv));
if ((Vbci<instanceStruct.instanceVar_maxvIbci))
{
{
double value_exp_0 = exp((Vbci*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*((Vbci*d_afac_dX+d_Vbci_dX*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbci*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*((Vbci-instanceStruct.instanceVar_maxvIbci)*d_afac_dX+(d_Vbci_dX-instanceStruct.d_instanceVar_maxvIbci_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbci*d_afac_dX+instanceStruct.d_instanceVar_maxvIbci_dX*afac))*(1.0+((Vbci-instanceStruct.instanceVar_maxvIbci)*afac)));
expi = (value_exp_0*(1.0+((Vbci-instanceStruct.instanceVar_maxvIbci)*afac)));
}
}
d_afac_dX = (-(modelStruct.modelPar_ncn*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_ncn_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_ncn*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_ncn*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_ncn*instanceStruct.instanceVar_vtv));
if ((Vbci<instanceStruct.instanceVar_maxvIbcn))
{
{
double value_exp_0 = exp((Vbci*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = deriv_exp_0_d0*((Vbci*d_afac_dX+d_Vbci_dX*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbcn*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = (value_exp_0*((Vbci-instanceStruct.instanceVar_maxvIbcn)*d_afac_dX+(d_Vbci_dX-instanceStruct.d_instanceVar_maxvIbcn_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbcn*d_afac_dX+instanceStruct.d_instanceVar_maxvIbcn_dX*afac))*(1.0+((Vbci-instanceStruct.instanceVar_maxvIbcn)*afac)));
expn = (value_exp_0*(1.0+((Vbci-instanceStruct.instanceVar_maxvIbcn)*afac)));
}
}
d_Ibcj_dX = ((instanceStruct.instanceVar_ibci_t*d_expi_dX+instanceStruct.d_instanceVar_ibci_t_dX*(expi-1.0))+(instanceStruct.instanceVar_ibcn_t*d_expn_dX+instanceStruct.d_instanceVar_ibcn_t_dX*(expn-1.0)));
Ibcj = ((instanceStruct.instanceVar_ibci_t*(expi-1.0))+(instanceStruct.instanceVar_ibcn_t*(expn-1.0)));
if (((modelStruct.modelPar_ibeip>0.0)||(modelStruct.modelPar_ibenp>0.0)))
{
d_afac_dX = (-(modelStruct.modelPar_nci*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_nci_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nci*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_nci*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_nci*instanceStruct.instanceVar_vtv));
if ((Vbep<instanceStruct.instanceVar_maxvIbeip))
{
{
double value_exp_0 = exp((Vbep*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*((Vbep*d_afac_dX+d_Vbep_dX*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbeip*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*((Vbep-instanceStruct.instanceVar_maxvIbeip)*d_afac_dX+(d_Vbep_dX-instanceStruct.d_instanceVar_maxvIbeip_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbeip*d_afac_dX+instanceStruct.d_instanceVar_maxvIbeip_dX*afac))*(1.0+((Vbep-instanceStruct.instanceVar_maxvIbeip)*afac)));
expi = (value_exp_0*(1.0+((Vbep-instanceStruct.instanceVar_maxvIbeip)*afac)));
}
}
d_afac_dX = (-(modelStruct.modelPar_ncn*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_ncn_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_ncn*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_ncn*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_ncn*instanceStruct.instanceVar_vtv));
if ((Vbep<instanceStruct.instanceVar_maxvIbenp))
{
{
double value_exp_0 = exp((Vbep*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = deriv_exp_0_d0*((Vbep*d_afac_dX+d_Vbep_dX*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbenp*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = (value_exp_0*((Vbep-instanceStruct.instanceVar_maxvIbenp)*d_afac_dX+(d_Vbep_dX-instanceStruct.d_instanceVar_maxvIbenp_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbenp*d_afac_dX+instanceStruct.d_instanceVar_maxvIbenp_dX*afac))*(1.0+((Vbep-instanceStruct.instanceVar_maxvIbenp)*afac)));
expn = (value_exp_0*(1.0+((Vbep-instanceStruct.instanceVar_maxvIbenp)*afac)));
}
}
instanceStruct.d_instanceVar_Ibep_dX = ((instanceStruct.instanceVar_ibeip_t*d_expi_dX+instanceStruct.d_instanceVar_ibeip_t_dX*(expi-1.0))+(instanceStruct.instanceVar_ibenp_t*d_expn_dX+instanceStruct.d_instanceVar_ibenp_t_dX*(expn-1.0)));
instanceStruct.instanceVar_Ibep = ((instanceStruct.instanceVar_ibeip_t*(expi-1.0))+(instanceStruct.instanceVar_ibenp_t*(expn-1.0)));
}
else
{
instanceStruct.d_instanceVar_Ibep_dX = 0.0;
instanceStruct.instanceVar_Ibep = 0.0;
}
d_arg_dX = ((instanceStruct.instanceVar_vtv*d_Vbci_dX-Vbci*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv);
arg = (Vbci/instanceStruct.instanceVar_vtv);
if ((arg<modelStruct.modelVar_VmaxExp))
{
{
double value_exp_0 = exp(arg);
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*(d_arg_dX);
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp(modelStruct.modelVar_VmaxExp);
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*(d_arg_dX-modelStruct.d_modelVar_VmaxExp_dX)+deriv_exp_0_d0*(modelStruct.d_modelVar_VmaxExp_dX)*(1.0+(arg-modelStruct.modelVar_VmaxExp)));
expi = (value_exp_0*(1.0+(arg-modelStruct.modelVar_VmaxExp)));
}
}
d_arg_dX = ((instanceStruct.instanceVar_vtv*d_Vbcx_dX-Vbcx*instanceStruct.d_instanceVar_vtv_dX)/instanceStruct.instanceVar_vtv/instanceStruct.instanceVar_vtv);
arg = (Vbcx/instanceStruct.instanceVar_vtv);
if ((arg<modelStruct.modelVar_VmaxExp))
{
{
double value_exp_0 = exp(arg);
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = deriv_exp_0_d0*(d_arg_dX);
expx = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp(modelStruct.modelVar_VmaxExp);
double  deriv_exp_0_d0 = value_exp_0;
d_expx_dX = (value_exp_0*(d_arg_dX-modelStruct.d_modelVar_VmaxExp_dX)+deriv_exp_0_d0*(modelStruct.d_modelVar_VmaxExp_dX)*(1.0+(arg-modelStruct.modelVar_VmaxExp)));
expx = (value_exp_0*(1.0+(arg-modelStruct.modelVar_VmaxExp)));
}
}
{
double value_sqrt_0 = sqrt((1.0+(gamm_t*expi)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_Kbci_dX = deriv_sqrt_0_d0*((gamm_t*d_expi_dX+d_gamm_t_dX*expi));
Kbci = value_sqrt_0;
}
{
double value_sqrt_0 = sqrt((1.0+(gamm_t*expx)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_Kbcx_dX = deriv_sqrt_0_d0*((gamm_t*d_expx_dX+d_gamm_t_dX*expx));
Kbcx = value_sqrt_0;
}
d_Ircx_dX = Vrcx*instanceStruct.d_instanceVar_Gcx_dX;
Ircx = (Vrcx*instanceStruct.instanceVar_Gcx);
d_rKp1_dX = (((Kbcx+1.0)*d_Kbci_dX-(Kbci+1.0)*d_Kbcx_dX)/(Kbcx+1.0)/(Kbcx+1.0));
rKp1 = ((Kbci+1.0)/(Kbcx+1.0));
{
double value_log_0 = log(rKp1);
double  deriv_log_0_d0 = (1.0/rKp1);
d_Iohm_dX = ((instanceStruct.instanceVar_Vrci+(instanceStruct.instanceVar_vtv*((Kbci-Kbcx)-value_log_0)))*instanceStruct.d_instanceVar_Gci_dX+(instanceStruct.d_instanceVar_Vrci_dX+(instanceStruct.instanceVar_vtv*((d_Kbci_dX-d_Kbcx_dX)-deriv_log_0_d0*(d_rKp1_dX))+instanceStruct.d_instanceVar_vtv_dX*((Kbci-Kbcx)-value_log_0)))*instanceStruct.instanceVar_Gci);
Iohm = ((instanceStruct.instanceVar_Vrci+(instanceStruct.instanceVar_vtv*((Kbci-Kbcx)-value_log_0)))*instanceStruct.instanceVar_Gci);
}
{
double value_sqrt_0 = sqrt(((instanceStruct.instanceVar_Vrci*instanceStruct.instanceVar_Vrci)+0.01));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_derf_dX = (((instanceStruct.instanceVar_Gci*(1.0+(((0.5*Ivo)*modelStruct.modelVar_Ihrcf)*value_sqrt_0)))*(Ivo*d_Iohm_dX+d_Ivo_dX*Iohm)-(Ivo*Iohm)*(instanceStruct.instanceVar_Gci*(((0.5*Ivo)*modelStruct.modelVar_Ihrcf)*deriv_sqrt_0_d0*((instanceStruct.instanceVar_Vrci*instanceStruct.d_instanceVar_Vrci_dX+instanceStruct.d_instanceVar_Vrci_dX*instanceStruct.instanceVar_Vrci))+((0.5*Ivo)*modelStruct.d_modelVar_Ihrcf_dX+0.5*d_Ivo_dX*modelStruct.modelVar_Ihrcf)*value_sqrt_0)+instanceStruct.d_instanceVar_Gci_dX*(1.0+(((0.5*Ivo)*modelStruct.modelVar_Ihrcf)*value_sqrt_0))))/(instanceStruct.instanceVar_Gci*(1.0+(((0.5*Ivo)*modelStruct.modelVar_Ihrcf)*value_sqrt_0)))/(instanceStruct.instanceVar_Gci*(1.0+(((0.5*Ivo)*modelStruct.modelVar_Ihrcf)*value_sqrt_0))));
derf = ((Ivo*Iohm)/(instanceStruct.instanceVar_Gci*(1.0+(((0.5*Ivo)*modelStruct.modelVar_Ihrcf)*value_sqrt_0))));
}
{
double value_sqrt_0 = sqrt((1+(derf*derf)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
instanceStruct.d_instanceVar_Irci_dX = ((value_sqrt_0*d_Iohm_dX-Iohm*deriv_sqrt_0_d0*((derf*d_derf_dX+d_derf_dX*derf)))/value_sqrt_0/value_sqrt_0);
instanceStruct.instanceVar_Irci = (Iohm/value_sqrt_0);
}
d_Irbx_dX = Vrbx*instanceStruct.d_instanceVar_Gbx_dX;
Irbx = (Vrbx*instanceStruct.instanceVar_Gbx);
d_Irbi_dX = ((Vrbi*instanceStruct.instanceVar_qb)*instanceStruct.d_instanceVar_Gbi_dX+Vrbi*instanceStruct.d_instanceVar_qb_dX*instanceStruct.instanceVar_Gbi);
Irbi = ((Vrbi*instanceStruct.instanceVar_qb)*instanceStruct.instanceVar_Gbi);
d_Ire_dX = Vre*instanceStruct.d_instanceVar_Ge_dX;
Ire = (Vre*instanceStruct.instanceVar_Ge);
d_Irbp_dX = ((Vrbp*instanceStruct.instanceVar_qbp)*instanceStruct.d_instanceVar_Gbp_dX+Vrbp*instanceStruct.d_instanceVar_qbp_dX*instanceStruct.instanceVar_Gbp);
Irbp = ((Vrbp*instanceStruct.instanceVar_qbp)*instanceStruct.instanceVar_Gbp);
d_Irs_dX = Vrs*instanceStruct.d_instanceVar_Gs_dX;
Irs = (Vrs*instanceStruct.instanceVar_Gs);
if ((modelStruct.modelPar_avc1>0.0))
{
//Begin block igcBlock
{
//Block-local variables for block igcBlock
double vminm=0.0;
double d_vminm_dX=0.0;
double vl=0.0;
double d_vl_dX=0.0;
double mac1=0.0;
double d_mac1_dX=0.0;
double expi=0.0;
double d_expi_dX=0.0;
double expl=0.0;
double d_expl_dX=0.0;
//End of Block-local variables
{
double value_pow_0 = pow((0.02*(avc2_t+1.0)),(1.0/(1.01-modelStruct.modelPar_mc)));
double  deriv_pow_0_d0 = (((0.02*(avc2_t+1.0)) == 0.0)?0.0:(value_pow_0*(1.0/(1.01-modelStruct.modelPar_mc))/(0.02*(avc2_t+1.0))));
double  deriv_pow_0_d1 = ((0.02*(avc2_t+1.0)) == 0.0)?0.0:(log((0.02*(avc2_t+1.0)))*value_pow_0);
d_vminm_dX = ((deriv_pow_0_d0*(0.02*d_avc2_t_dX))+(deriv_pow_0_d1*((-(-modelStruct.d_modelPar_mc_dX)/(1.01-modelStruct.modelPar_mc)/(1.01-modelStruct.modelPar_mc)))));
vminm = value_pow_0;
}
{
double value_sqrt_0 = sqrt(((((pc_t-Vbci)-vminm)*((pc_t-Vbci)-vminm))+0.01));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_vl_dX = (0.5*(deriv_sqrt_0_d0*((((pc_t-Vbci)-vminm)*((d_pc_t_dX-d_Vbci_dX)-d_vminm_dX)+((d_pc_t_dX-d_Vbci_dX)-d_vminm_dX)*((pc_t-Vbci)-vminm)))+((d_pc_t_dX-d_Vbci_dX)-d_vminm_dX))+d_vminm_dX);
vl = ((0.5*(value_sqrt_0+((pc_t-Vbci)-vminm)))+vminm);
}
{
double value_pow_0 = pow(vl,(modelStruct.modelPar_mc-1.0));
double  deriv_pow_0_d0 = ((vl == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_mc-1.0)/vl));
double  deriv_pow_0_d1 = (vl == 0.0)?0.0:(log(vl)*value_pow_0);
d_mac1_dX = ((-avc2_t)*((deriv_pow_0_d0*(d_vl_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_mc_dX)))+(-d_avc2_t_dX)*value_pow_0);
mac1 = ((-avc2_t)*value_pow_0);
}
if ((mac1<modelStruct.modelVar_VmaxExp))
{
{
double value_exp_0 = exp(mac1);
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*(d_mac1_dX);
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp(modelStruct.modelVar_VmaxExp);
double  deriv_exp_0_d0 = value_exp_0;
d_expl_dX = deriv_exp_0_d0*(modelStruct.d_modelVar_VmaxExp_dX);
expl = value_exp_0;
}
d_expi_dX = (expl*(d_mac1_dX-modelStruct.d_modelVar_VmaxExp_dX)+d_expl_dX*(1.0+(mac1-modelStruct.modelVar_VmaxExp)));
expi = (expl*(1.0+(mac1-modelStruct.modelVar_VmaxExp)));
}
d_avalf_dX = ((modelStruct.modelPar_avc1*vl)*d_expi_dX+(modelStruct.modelPar_avc1*d_vl_dX+modelStruct.d_modelPar_avc1_dX*vl)*expi);
avalf = ((modelStruct.modelPar_avc1*vl)*expi);
}
// End block igcBlock
d_Igc_dX = (((Itxf-Itzr)-Ibcj)*d_avalf_dX+((d_Itxf_dX-d_Itzr_dX)-d_Ibcj_dX)*avalf);
Igc = (((Itxf-Itzr)-Ibcj)*avalf);
}
else
{
d_Igc_dX = 0.0;
Igc = 0.0;
}
if ((modelStruct.modelPar_avcx1>0.0))
{
//Begin block igcxBlock
{
//Block-local variables for block igcxBlock
double vminm=0.0;
double d_vminm_dX=0.0;
double vl=0.0;
double d_vl_dX=0.0;
double mac1=0.0;
double d_mac1_dX=0.0;
double expi=0.0;
double d_expi_dX=0.0;
double expl=0.0;
double d_expl_dX=0.0;
//End of Block-local variables
{
double value_pow_0 = pow((0.02*(avcx2_t+1.0)),(1.0/(1.01-modelStruct.modelPar_mcx)));
double  deriv_pow_0_d0 = (((0.02*(avcx2_t+1.0)) == 0.0)?0.0:(value_pow_0*(1.0/(1.01-modelStruct.modelPar_mcx))/(0.02*(avcx2_t+1.0))));
double  deriv_pow_0_d1 = ((0.02*(avcx2_t+1.0)) == 0.0)?0.0:(log((0.02*(avcx2_t+1.0)))*value_pow_0);
d_vminm_dX = ((deriv_pow_0_d0*(0.02*d_avcx2_t_dX))+(deriv_pow_0_d1*((-(-modelStruct.d_modelPar_mcx_dX)/(1.01-modelStruct.modelPar_mcx)/(1.01-modelStruct.modelPar_mcx)))));
vminm = value_pow_0;
}
{
double value_sqrt_0 = sqrt(((((-Vbxcx)-vminm)*((-Vbxcx)-vminm))+0.01));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_vl_dX = (0.5*(deriv_sqrt_0_d0*((((-Vbxcx)-vminm)*((-d_Vbxcx_dX)-d_vminm_dX)+((-d_Vbxcx_dX)-d_vminm_dX)*((-Vbxcx)-vminm)))+((-d_Vbxcx_dX)-d_vminm_dX))+d_vminm_dX);
vl = ((0.5*(value_sqrt_0+((-Vbxcx)-vminm)))+vminm);
}
{
double value_pow_0 = pow(vl,(modelStruct.modelPar_mcx-1.0));
double  deriv_pow_0_d0 = ((vl == 0.0)?0.0:(value_pow_0*(modelStruct.modelPar_mcx-1.0)/vl));
double  deriv_pow_0_d1 = (vl == 0.0)?0.0:(log(vl)*value_pow_0);
d_mac1_dX = ((-avcx2_t)*((deriv_pow_0_d0*(d_vl_dX))+(deriv_pow_0_d1*(modelStruct.d_modelPar_mcx_dX)))+(-d_avcx2_t_dX)*value_pow_0);
mac1 = ((-avcx2_t)*value_pow_0);
}
if ((mac1<modelStruct.modelVar_VmaxExp))
{
{
double value_exp_0 = exp(mac1);
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*(d_mac1_dX);
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp(modelStruct.modelVar_VmaxExp);
double  deriv_exp_0_d0 = value_exp_0;
d_expl_dX = deriv_exp_0_d0*(modelStruct.d_modelVar_VmaxExp_dX);
expl = value_exp_0;
}
d_expi_dX = (expl*(d_mac1_dX-modelStruct.d_modelVar_VmaxExp_dX)+d_expl_dX*(1.0+(mac1-modelStruct.modelVar_VmaxExp)));
expi = (expl*(1.0+(mac1-modelStruct.modelVar_VmaxExp)));
}
d_avalf_dX = ((modelStruct.modelPar_avcx1*vl)*d_expi_dX+(modelStruct.modelPar_avcx1*d_vl_dX+modelStruct.d_modelPar_avcx1_dX*vl)*expi);
avalf = ((modelStruct.modelPar_avcx1*vl)*expi);
}
// End block igcxBlock
d_Igcx_dX = ((-Ircx)*d_avalf_dX+(-d_Ircx_dX)*avalf);
Igcx = ((-Ircx)*avalf);
}
else
{
d_Igcx_dX = 0.0;
Igcx = 0.0;
}
if (((modelStruct.modelPar_bbk>0.0)&&(modelStruct.modelPar_ibk0>0.0)))
{
if ((modelStruct.modelPar_vpte>0.0))
{
d_VcbFac_dX = (-((modelStruct.modelPar_vpte*d_Vbci_dX-Vbci*modelStruct.d_modelPar_vpte_dX)/modelStruct.modelPar_vpte/modelStruct.modelPar_vpte));
VcbFac = ((1.0-(Vbci/modelStruct.modelPar_vpte))-0.1);
{
double value_sqrt_0 = sqrt(((VcbFac*VcbFac)+1.0e-4));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_VcbFac_dX = 0.5*(d_VcbFac_dX+deriv_sqrt_0_d0*((VcbFac*d_VcbFac_dX+d_VcbFac_dX*VcbFac)));
VcbFac = (0.1+(0.5*(VcbFac+value_sqrt_0)));
}
d_Iibk_dX = (modelStruct.modelPar_ibk0*d_VcbFac_dX+modelStruct.d_modelPar_ibk0_dX*VcbFac);
Iibk = (modelStruct.modelPar_ibk0*VcbFac);
}
else
{
d_Iibk_dX = modelStruct.d_modelPar_ibk0_dX;
Iibk = modelStruct.modelPar_ibk0;
}
{
double value_pow_0 = pow(((instanceStruct.instanceVar_Itzf/Iibk)-1.0),modelStruct.modelPar_abk);
double  deriv_pow_0_d0 = ((((instanceStruct.instanceVar_Itzf/Iibk)-1.0) == 0.0)?0.0:(value_pow_0*modelStruct.modelPar_abk/((instanceStruct.instanceVar_Itzf/Iibk)-1.0)));
double  deriv_pow_0_d1 = (((instanceStruct.instanceVar_Itzf/Iibk)-1.0) == 0.0)?0.0:(log(((instanceStruct.instanceVar_Itzf/Iibk)-1.0))*value_pow_0);
d_Ibk_dX = (modelStruct.modelPar_bbk*((deriv_pow_0_d0*(((Iibk*instanceStruct.d_instanceVar_Itzf_dX-instanceStruct.instanceVar_Itzf*d_Iibk_dX)/Iibk/Iibk)))+(deriv_pow_0_d1*(modelStruct.d_modelPar_abk_dX)))+modelStruct.d_modelPar_bbk_dX*value_pow_0);
Ibk = (modelStruct.modelPar_bbk*value_pow_0);
}
}
else
{
d_Ibk_dX = 0.0;
Ibk = 0.0;
}
d_Ibc_dX = ((d_Ibcj_dX-d_Igc_dX)-d_Ibk_dX);
Ibc = ((Ibcj-Igc)-Ibk);
if (((modelStruct.modelPar_ibcip>0.0)||(modelStruct.modelPar_ibcnp>0.0)))
{
d_afac_dX = (-(modelStruct.modelPar_ncip*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_ncip_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_ncip*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_ncip*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_ncip*instanceStruct.instanceVar_vtv));
if ((Vbcp<instanceStruct.instanceVar_maxvIbcip))
{
{
double value_exp_0 = exp((Vbcp*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*((Vbcp*d_afac_dX+d_Vbcp_dX*afac));
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbcip*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*((Vbcp-instanceStruct.instanceVar_maxvIbcip)*d_afac_dX+(d_Vbcp_dX-instanceStruct.d_instanceVar_maxvIbcip_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbcip*d_afac_dX+instanceStruct.d_instanceVar_maxvIbcip_dX*afac))*(1.0+((Vbcp-instanceStruct.instanceVar_maxvIbcip)*afac)));
expi = (value_exp_0*(1.0+((Vbcp-instanceStruct.instanceVar_maxvIbcip)*afac)));
}
}
d_afac_dX = (-(modelStruct.modelPar_ncnp*instanceStruct.d_instanceVar_vtv_dX+modelStruct.d_modelPar_ncnp_dX*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_ncnp*instanceStruct.instanceVar_vtv)/(modelStruct.modelPar_ncnp*instanceStruct.instanceVar_vtv));
afac = (1.0/(modelStruct.modelPar_ncnp*instanceStruct.instanceVar_vtv));
if ((Vbcp<instanceStruct.instanceVar_maxvIbcnp))
{
{
double value_exp_0 = exp((Vbcp*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = deriv_exp_0_d0*((Vbcp*d_afac_dX+d_Vbcp_dX*afac));
expn = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp((instanceStruct.instanceVar_maxvIbcnp*afac));
double  deriv_exp_0_d0 = value_exp_0;
d_expn_dX = (value_exp_0*((Vbcp-instanceStruct.instanceVar_maxvIbcnp)*d_afac_dX+(d_Vbcp_dX-instanceStruct.d_instanceVar_maxvIbcnp_dX)*afac)+deriv_exp_0_d0*((instanceStruct.instanceVar_maxvIbcnp*d_afac_dX+instanceStruct.d_instanceVar_maxvIbcnp_dX*afac))*(1.0+((Vbcp-instanceStruct.instanceVar_maxvIbcnp)*afac)));
expn = (value_exp_0*(1.0+((Vbcp-instanceStruct.instanceVar_maxvIbcnp)*afac)));
}
}
d_Ibcp_dX = ((instanceStruct.instanceVar_ibcip_t*d_expi_dX+instanceStruct.d_instanceVar_ibcip_t_dX*(expi-1.0))+(instanceStruct.instanceVar_ibcnp_t*d_expn_dX+instanceStruct.d_instanceVar_ibcnp_t_dX*(expn-1.0)));
Ibcp = ((instanceStruct.instanceVar_ibcip_t*(expi-1.0))+(instanceStruct.instanceVar_ibcnp_t*(expn-1.0)));
}
else
{
d_Ibcp_dX = 0.0;
Ibcp = 0.0;
}
d_power_dX = ((((((((((((((instanceStruct.instanceVar_Ibe*d_Vbei_dX+instanceStruct.d_instanceVar_Ibe_dX*Vbei)+(Ibc*d_Vbci_dX+d_Ibc_dX*Vbci))+((Itxf-Itzr)*d_Vcei_dX+(d_Itxf_dX-d_Itzr_dX)*Vcei))+(instanceStruct.instanceVar_Ibex*d_Vbex_dX+instanceStruct.d_instanceVar_Ibex_dX*Vbex))+(instanceStruct.instanceVar_Ibep*d_Vbep_dX+instanceStruct.d_instanceVar_Ibep_dX*Vbep))+d_Irs_dX*Vrs)+(Ibcp*d_Vbcp_dX+d_Ibcp_dX*Vbcp))+(instanceStruct.instanceVar_Iccp*d_Vcep_dX+instanceStruct.d_instanceVar_Iccp_dX*Vcep))+d_Ircx_dX*Vrcx)+(instanceStruct.instanceVar_Irci*instanceStruct.d_instanceVar_Vrci_dX+instanceStruct.d_instanceVar_Irci_dX*instanceStruct.instanceVar_Vrci))+d_Irbx_dX*Vrbx)+d_Irbi_dX*Vrbi)+d_Ire_dX*Vre)+d_Irbp_dX*Vrbp);
power = ((((((((((((((instanceStruct.instanceVar_Ibe*Vbei)+(Ibc*Vbci))+((Itxf-Itzr)*Vcei))+(instanceStruct.instanceVar_Ibex*Vbex))+(instanceStruct.instanceVar_Ibep*Vbep))+(Irs*Vrs))+(Ibcp*Vbcp))+(instanceStruct.instanceVar_Iccp*Vcep))+(Ircx*Vrcx))+(instanceStruct.instanceVar_Irci*instanceStruct.instanceVar_Vrci))+(Irbx*Vrbx))+(Irbi*Vrbi))+(Ire*Vre))+(Irbp*Vrbp));
d_Ith_dX = (-instanceStruct.instancePar_sw_et)*d_power_dX;
Ith = ((-instanceStruct.instancePar_sw_et)*power);
d_Irth_dX = dt_et*d_Gth_dX;
Irth = (dt_et*Gth);
d_Ixf1_dX = (-instanceStruct.d_instanceVar_Itzf_dX);
Ixf1 = (Vxf2-instanceStruct.instanceVar_Itzf);
Ixf2 = (Vxf2-Vxf1);
instanceStruct.d_instanceVar_Ibe_dX = (instanceStruct.d_instanceVar_Ibe_dX+(modelStruct.modelVar_gminMod*d_Vbei_dX+modelStruct.d_modelVar_gminMod_dX*Vbei));
instanceStruct.instanceVar_Ibe = (instanceStruct.instanceVar_Ibe+(modelStruct.modelVar_gminMod*Vbei));
instanceStruct.d_instanceVar_Ibex_dX = (instanceStruct.d_instanceVar_Ibex_dX+(modelStruct.modelVar_gminMod*d_Vbex_dX+modelStruct.d_modelVar_gminMod_dX*Vbex));
instanceStruct.instanceVar_Ibex = (instanceStruct.instanceVar_Ibex+(modelStruct.modelVar_gminMod*Vbex));
instanceStruct.d_instanceVar_Ibep_dX = (instanceStruct.d_instanceVar_Ibep_dX+(modelStruct.modelVar_gminMod*d_Vbep_dX+modelStruct.d_modelVar_gminMod_dX*Vbep));
instanceStruct.instanceVar_Ibep = (instanceStruct.instanceVar_Ibep+(modelStruct.modelVar_gminMod*Vbep));
d_Ibc_dX = (d_Ibc_dX+(modelStruct.modelVar_gminMod*d_Vbci_dX+modelStruct.d_modelVar_gminMod_dX*Vbci));
Ibc = (Ibc+(modelStruct.modelVar_gminMod*Vbci));
d_Igcx_dX = (d_Igcx_dX+(modelStruct.modelVar_gminMod*d_Vbxcx_dX+modelStruct.d_modelVar_gminMod_dX*Vbxcx));
Igcx = (Igcx+(modelStruct.modelVar_gminMod*Vbxcx));
d_Ibcp_dX = (d_Ibcp_dX+(modelStruct.modelVar_gminMod*d_Vbcp_dX+modelStruct.d_modelVar_gminMod_dX*Vbcp));
Ibcp = (Ibcp+(modelStruct.modelVar_gminMod*Vbcp));
instanceStruct.d_instanceVar_Ibe_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.d_instanceVar_Ibe_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*instanceStruct.instanceVar_Ibe);
instanceStruct.instanceVar_Ibe = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.instanceVar_Ibe);
instanceStruct.d_instanceVar_Ibex_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.d_instanceVar_Ibex_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*instanceStruct.instanceVar_Ibex);
instanceStruct.instanceVar_Ibex = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.instanceVar_Ibex);
instanceStruct.d_instanceVar_Itzf_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.d_instanceVar_Itzf_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*instanceStruct.instanceVar_Itzf);
instanceStruct.instanceVar_Itzf = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.instanceVar_Itzf);
d_Itxf_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*d_Itxf_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*Itxf);
Itxf = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*Itxf);
d_Itzr_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*d_Itzr_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*Itzr);
Itzr = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*Itzr);
d_Ibc_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*d_Ibc_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*Ibc);
Ibc = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*Ibc);
d_Igcx_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*d_Igcx_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*Igcx);
Igcx = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*Igcx);
instanceStruct.d_instanceVar_Ibep_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.d_instanceVar_Ibep_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*instanceStruct.instanceVar_Ibep);
instanceStruct.instanceVar_Ibep = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.instanceVar_Ibep);
d_Ircx_dX = (instanceStruct.instanceVar_mMod*d_Ircx_dX+instanceStruct.d_instanceVar_mMod_dX*Ircx);
Ircx = (instanceStruct.instanceVar_mMod*Ircx);
instanceStruct.d_instanceVar_Irci_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.d_instanceVar_Irci_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*instanceStruct.instanceVar_Irci);
instanceStruct.instanceVar_Irci = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.instanceVar_Irci);
d_Irbx_dX = (instanceStruct.instanceVar_mMod*d_Irbx_dX+instanceStruct.d_instanceVar_mMod_dX*Irbx);
Irbx = (instanceStruct.instanceVar_mMod*Irbx);
d_Irbi_dX = (instanceStruct.instanceVar_mMod*d_Irbi_dX+instanceStruct.d_instanceVar_mMod_dX*Irbi);
Irbi = (instanceStruct.instanceVar_mMod*Irbi);
d_Ire_dX = (instanceStruct.instanceVar_mMod*d_Ire_dX+instanceStruct.d_instanceVar_mMod_dX*Ire);
Ire = (instanceStruct.instanceVar_mMod*Ire);
d_Irbp_dX = (instanceStruct.instanceVar_mMod*d_Irbp_dX+instanceStruct.d_instanceVar_mMod_dX*Irbp);
Irbp = (instanceStruct.instanceVar_mMod*Irbp);
d_Ibcp_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*d_Ibcp_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*Ibcp);
Ibcp = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*Ibcp);
instanceStruct.d_instanceVar_Iccp_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.d_instanceVar_Iccp_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*instanceStruct.instanceVar_Iccp);
instanceStruct.instanceVar_Iccp = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*instanceStruct.instanceVar_Iccp);
d_Irs_dX = (instanceStruct.instanceVar_mMod*d_Irs_dX+instanceStruct.d_instanceVar_mMod_dX*Irs);
Irs = (instanceStruct.instanceVar_mMod*Irs);
d_Ith_dX = (instanceStruct.instanceVar_mMod*d_Ith_dX+instanceStruct.d_instanceVar_mMod_dX*Ith);
Ith = (instanceStruct.instanceVar_mMod*Ith);
d_Irth_dX = (instanceStruct.instanceVar_mMod*d_Irth_dX+instanceStruct.d_instanceVar_mMod_dX*Irth);
Irth = (instanceStruct.instanceVar_mMod*Irth);
}
// End block evaluateStatic
//Begin block evaluateDynamic
{
if ((modelStruct.modelPar_cjcp>0.0))
{
//Begin block qdbcpBlock
{
//Block-local variables for block qdbcpBlock
double dv0=0.0;
double d_dv0_dX=0.0;
double dvh=0.0;
double d_dvh_dX=0.0;
double pwq=0.0;
double d_pwq_dX=0.0;
double qlo=0.0;
double d_qlo_dX=0.0;
double qhi=0.0;
double d_qhi_dX=0.0;
double mv0=0.0;
double d_mv0_dX=0.0;
double vl0=0.0;
double d_vl0_dX=0.0;
double q0=0.0;
double d_q0_dX=0.0;
double dv=0.0;
double d_dv_dX=0.0;
double mv=0.0;
double d_mv_dX=0.0;
double vl=0.0;
double d_vl_dX=0.0;
//End of Block-local variables
d_dv0_dX = ((-ps_t)*modelStruct.d_modelPar_fc_dX+(-d_ps_t_dX)*modelStruct.modelPar_fc);
dv0 = ((-ps_t)*modelStruct.modelPar_fc);
if ((modelStruct.modelPar_ajs<=0.0))
{
d_dvh_dX = (d_Vbcp_dX+d_dv0_dX);
dvh = (Vbcp+dv0);
if ((dvh>0.0))
{
{
double value_pow_0 = pow((1.0-modelStruct.modelPar_fc),(-modelStruct.modelPar_ms));
double  deriv_pow_0_d0 = (((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_ms)/(1.0-modelStruct.modelPar_fc)));
double  deriv_pow_0_d1 = ((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(log((1.0-modelStruct.modelPar_fc))*value_pow_0);
d_pwq_dX = ((deriv_pow_0_d0*((-modelStruct.d_modelPar_fc_dX)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_ms_dX))));
pwq = value_pow_0;
}
d_qlo_dX = (((1.0-modelStruct.modelPar_ms)*(ps_t*(-(pwq*(-modelStruct.d_modelPar_fc_dX)+d_pwq_dX*(1.0-modelStruct.modelPar_fc)))+d_ps_t_dX*(1.0-(pwq*(1.0-modelStruct.modelPar_fc))))-(ps_t*(1.0-(pwq*(1.0-modelStruct.modelPar_fc))))*(-modelStruct.d_modelPar_ms_dX))/(1.0-modelStruct.modelPar_ms)/(1.0-modelStruct.modelPar_ms));
qlo = ((ps_t*(1.0-(pwq*(1.0-modelStruct.modelPar_fc))))/(1.0-modelStruct.modelPar_ms));
d_qhi_dX = ((dvh*(1.0+(((0.5*modelStruct.modelPar_ms)*dvh)/(ps_t*(1.0-modelStruct.modelPar_fc)))))*d_pwq_dX+(dvh*(((ps_t*(1.0-modelStruct.modelPar_fc))*((0.5*modelStruct.modelPar_ms)*d_dvh_dX+0.5*modelStruct.d_modelPar_ms_dX*dvh)-((0.5*modelStruct.modelPar_ms)*dvh)*(ps_t*(-modelStruct.d_modelPar_fc_dX)+d_ps_t_dX*(1.0-modelStruct.modelPar_fc)))/(ps_t*(1.0-modelStruct.modelPar_fc))/(ps_t*(1.0-modelStruct.modelPar_fc)))+d_dvh_dX*(1.0+(((0.5*modelStruct.modelPar_ms)*dvh)/(ps_t*(1.0-modelStruct.modelPar_fc)))))*pwq);
qhi = ((dvh*(1.0+(((0.5*modelStruct.modelPar_ms)*dvh)/(ps_t*(1.0-modelStruct.modelPar_fc)))))*pwq);
}
else
{
{
double value_pow_0 = pow((1.0-(Vbcp/ps_t)),(1.0-modelStruct.modelPar_ms));
double  deriv_pow_0_d0 = (((1.0-(Vbcp/ps_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_ms)/(1.0-(Vbcp/ps_t))));
double  deriv_pow_0_d1 = ((1.0-(Vbcp/ps_t)) == 0.0)?0.0:(log((1.0-(Vbcp/ps_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_ms)*(ps_t*(-((deriv_pow_0_d0*((-((ps_t*d_Vbcp_dX-Vbcp*d_ps_t_dX)/ps_t/ps_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_ms_dX)))))+d_ps_t_dX*(1.0-value_pow_0))-(ps_t*(1.0-value_pow_0))*(-modelStruct.d_modelPar_ms_dX))/(1.0-modelStruct.modelPar_ms)/(1.0-modelStruct.modelPar_ms));
qlo = ((ps_t*(1.0-value_pow_0))/(1.0-modelStruct.modelPar_ms));
}
d_qhi_dX = 0.0;
qhi = 0.0;
}
d_qdbcp_dX = (d_qlo_dX+d_qhi_dX);
qdbcp = (qlo+qhi);
}
else
{
{
double value_sqrt_0 = sqrt(((dv0*dv0)+((4.0*modelStruct.modelPar_ajs)*modelStruct.modelPar_ajs)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_mv0_dX = deriv_sqrt_0_d0*(((dv0*d_dv0_dX+d_dv0_dX*dv0)+((4.0*modelStruct.modelPar_ajs)*modelStruct.d_modelPar_ajs_dX+4.0*modelStruct.d_modelPar_ajs_dX*modelStruct.modelPar_ajs)));
mv0 = value_sqrt_0;
}
d_vl0_dX = (-0.5)*(d_dv0_dX+d_mv0_dX);
vl0 = ((-0.5)*(dv0+mv0));
{
double value_pow_0 = pow((1.0-(vl0/ps_t)),(1.0-modelStruct.modelPar_ms));
double  deriv_pow_0_d0 = (((1.0-(vl0/ps_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_ms)/(1.0-(vl0/ps_t))));
double  deriv_pow_0_d1 = ((1.0-(vl0/ps_t)) == 0.0)?0.0:(log((1.0-(vl0/ps_t)))*value_pow_0);
d_q0_dX = (((1.0-modelStruct.modelPar_ms)*((-ps_t)*((deriv_pow_0_d0*((-((ps_t*d_vl0_dX-vl0*d_ps_t_dX)/ps_t/ps_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_ms_dX))))+(-d_ps_t_dX)*value_pow_0)-((-ps_t)*value_pow_0)*(-modelStruct.d_modelPar_ms_dX))/(1.0-modelStruct.modelPar_ms)/(1.0-modelStruct.modelPar_ms));
q0 = (((-ps_t)*value_pow_0)/(1.0-modelStruct.modelPar_ms));
}
d_dv_dX = (d_Vbcp_dX+d_dv0_dX);
dv = (Vbcp+dv0);
{
double value_sqrt_0 = sqrt(((dv*dv)+((4.0*modelStruct.modelPar_ajs)*modelStruct.modelPar_ajs)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_mv_dX = deriv_sqrt_0_d0*(((dv*d_dv_dX+d_dv_dX*dv)+((4.0*modelStruct.modelPar_ajs)*modelStruct.d_modelPar_ajs_dX+4.0*modelStruct.d_modelPar_ajs_dX*modelStruct.modelPar_ajs)));
mv = value_sqrt_0;
}
d_vl_dX = (0.5*(d_dv_dX-d_mv_dX)-d_dv0_dX);
vl = ((0.5*(dv-mv))-dv0);
{
double value_pow_0 = pow((1.0-(vl/ps_t)),(1.0-modelStruct.modelPar_ms));
double  deriv_pow_0_d0 = (((1.0-(vl/ps_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_ms)/(1.0-(vl/ps_t))));
double  deriv_pow_0_d1 = ((1.0-(vl/ps_t)) == 0.0)?0.0:(log((1.0-(vl/ps_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_ms)*((-ps_t)*((deriv_pow_0_d0*((-((ps_t*d_vl_dX-vl*d_ps_t_dX)/ps_t/ps_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_ms_dX))))+(-d_ps_t_dX)*value_pow_0)-((-ps_t)*value_pow_0)*(-modelStruct.d_modelPar_ms_dX))/(1.0-modelStruct.modelPar_ms)/(1.0-modelStruct.modelPar_ms));
qlo = (((-ps_t)*value_pow_0)/(1.0-modelStruct.modelPar_ms));
}
{
double value_pow_0 = pow((1.0-modelStruct.modelPar_fc),(-modelStruct.modelPar_ms));
double  deriv_pow_0_d0 = (((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_ms)/(1.0-modelStruct.modelPar_fc)));
double  deriv_pow_0_d1 = ((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(log((1.0-modelStruct.modelPar_fc))*value_pow_0);
d_qdbcp_dX = ((d_qlo_dX+((value_pow_0*((Vbcp-vl)+vl0))*(((ps_t*(1.0-modelStruct.modelPar_fc))*((0.5*modelStruct.modelPar_ms)*((d_Vbcp_dX-d_vl_dX)+d_vl0_dX)+0.5*modelStruct.d_modelPar_ms_dX*((Vbcp-vl)+vl0))-((0.5*modelStruct.modelPar_ms)*((Vbcp-vl)+vl0))*(ps_t*(-modelStruct.d_modelPar_fc_dX)+d_ps_t_dX*(1.0-modelStruct.modelPar_fc)))/(ps_t*(1.0-modelStruct.modelPar_fc))/(ps_t*(1.0-modelStruct.modelPar_fc)))+(value_pow_0*((d_Vbcp_dX-d_vl_dX)+d_vl0_dX)+((deriv_pow_0_d0*((-modelStruct.d_modelPar_fc_dX)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_ms_dX))))*((Vbcp-vl)+vl0))*(1.0+(((0.5*modelStruct.modelPar_ms)*((Vbcp-vl)+vl0))/(ps_t*(1.0-modelStruct.modelPar_fc))))))-d_q0_dX);
qdbcp = ((qlo+((value_pow_0*((Vbcp-vl)+vl0))*(1.0+(((0.5*modelStruct.modelPar_ms)*((Vbcp-vl)+vl0))/(ps_t*(1.0-modelStruct.modelPar_fc))))))-q0);
}
}
}
// End block qdbcpBlock
}
else
{
d_qdbcp_dX = 0.0;
qdbcp = 0.0;
}
//Begin block qdbexBlock
{
//Block-local variables for block qdbexBlock
double dv0=0.0;
double d_dv0_dX=0.0;
double dvh=0.0;
double d_dvh_dX=0.0;
double pwq=0.0;
double d_pwq_dX=0.0;
double qlo=0.0;
double d_qlo_dX=0.0;
double qhi=0.0;
double d_qhi_dX=0.0;
double mv0=0.0;
double d_mv0_dX=0.0;
double vl0=0.0;
double d_vl0_dX=0.0;
double q0=0.0;
double d_q0_dX=0.0;
double dv=0.0;
double d_dv_dX=0.0;
double mv=0.0;
double d_mv_dX=0.0;
double vl=0.0;
double d_vl_dX=0.0;
//End of Block-local variables
d_dv0_dX = ((-pe_t)*modelStruct.d_modelPar_fc_dX+(-d_pe_t_dX)*modelStruct.modelPar_fc);
dv0 = ((-pe_t)*modelStruct.modelPar_fc);
if ((modelStruct.modelPar_aje<=0.0))
{
d_dvh_dX = (d_Vbex_dX+d_dv0_dX);
dvh = (Vbex+dv0);
if ((dvh>0.0))
{
{
double value_pow_0 = pow((1.0-modelStruct.modelPar_fc),(-modelStruct.modelPar_me));
double  deriv_pow_0_d0 = (((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_fc)));
double  deriv_pow_0_d1 = ((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(log((1.0-modelStruct.modelPar_fc))*value_pow_0);
d_pwq_dX = ((deriv_pow_0_d0*((-modelStruct.d_modelPar_fc_dX)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_me_dX))));
pwq = value_pow_0;
}
d_qlo_dX = (((1.0-modelStruct.modelPar_me)*(pe_t*(-(pwq*(-modelStruct.d_modelPar_fc_dX)+d_pwq_dX*(1.0-modelStruct.modelPar_fc)))+d_pe_t_dX*(1.0-(pwq*(1.0-modelStruct.modelPar_fc))))-(pe_t*(1.0-(pwq*(1.0-modelStruct.modelPar_fc))))*(-modelStruct.d_modelPar_me_dX))/(1.0-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_me));
qlo = ((pe_t*(1.0-(pwq*(1.0-modelStruct.modelPar_fc))))/(1.0-modelStruct.modelPar_me));
d_qhi_dX = ((dvh*(1.0+(((0.5*modelStruct.modelPar_me)*dvh)/(pe_t*(1.0-modelStruct.modelPar_fc)))))*d_pwq_dX+(dvh*(((pe_t*(1.0-modelStruct.modelPar_fc))*((0.5*modelStruct.modelPar_me)*d_dvh_dX+0.5*modelStruct.d_modelPar_me_dX*dvh)-((0.5*modelStruct.modelPar_me)*dvh)*(pe_t*(-modelStruct.d_modelPar_fc_dX)+d_pe_t_dX*(1.0-modelStruct.modelPar_fc)))/(pe_t*(1.0-modelStruct.modelPar_fc))/(pe_t*(1.0-modelStruct.modelPar_fc)))+d_dvh_dX*(1.0+(((0.5*modelStruct.modelPar_me)*dvh)/(pe_t*(1.0-modelStruct.modelPar_fc)))))*pwq);
qhi = ((dvh*(1.0+(((0.5*modelStruct.modelPar_me)*dvh)/(pe_t*(1.0-modelStruct.modelPar_fc)))))*pwq);
}
else
{
{
double value_pow_0 = pow((1.0-(Vbex/pe_t)),(1.0-modelStruct.modelPar_me));
double  deriv_pow_0_d0 = (((1.0-(Vbex/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_me)/(1.0-(Vbex/pe_t))));
double  deriv_pow_0_d1 = ((1.0-(Vbex/pe_t)) == 0.0)?0.0:(log((1.0-(Vbex/pe_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_me)*(pe_t*(-((deriv_pow_0_d0*((-((pe_t*d_Vbex_dX-Vbex*d_pe_t_dX)/pe_t/pe_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_me_dX)))))+d_pe_t_dX*(1.0-value_pow_0))-(pe_t*(1.0-value_pow_0))*(-modelStruct.d_modelPar_me_dX))/(1.0-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_me));
qlo = ((pe_t*(1.0-value_pow_0))/(1.0-modelStruct.modelPar_me));
}
d_qhi_dX = 0.0;
qhi = 0.0;
}
d_qdbex_dX = (d_qlo_dX+d_qhi_dX);
qdbex = (qlo+qhi);
}
else
{
{
double value_sqrt_0 = sqrt(((dv0*dv0)+((4.0*modelStruct.modelPar_aje)*modelStruct.modelPar_aje)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_mv0_dX = deriv_sqrt_0_d0*(((dv0*d_dv0_dX+d_dv0_dX*dv0)+((4.0*modelStruct.modelPar_aje)*modelStruct.d_modelPar_aje_dX+4.0*modelStruct.d_modelPar_aje_dX*modelStruct.modelPar_aje)));
mv0 = value_sqrt_0;
}
d_vl0_dX = (-0.5)*(d_dv0_dX+d_mv0_dX);
vl0 = ((-0.5)*(dv0+mv0));
{
double value_pow_0 = pow((1.0-(vl0/pe_t)),(1.0-modelStruct.modelPar_me));
double  deriv_pow_0_d0 = (((1.0-(vl0/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_me)/(1.0-(vl0/pe_t))));
double  deriv_pow_0_d1 = ((1.0-(vl0/pe_t)) == 0.0)?0.0:(log((1.0-(vl0/pe_t)))*value_pow_0);
d_q0_dX = (((1.0-modelStruct.modelPar_me)*((-pe_t)*((deriv_pow_0_d0*((-((pe_t*d_vl0_dX-vl0*d_pe_t_dX)/pe_t/pe_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_me_dX))))+(-d_pe_t_dX)*value_pow_0)-((-pe_t)*value_pow_0)*(-modelStruct.d_modelPar_me_dX))/(1.0-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_me));
q0 = (((-pe_t)*value_pow_0)/(1.0-modelStruct.modelPar_me));
}
d_dv_dX = (d_Vbex_dX+d_dv0_dX);
dv = (Vbex+dv0);
{
double value_sqrt_0 = sqrt(((dv*dv)+((4.0*modelStruct.modelPar_aje)*modelStruct.modelPar_aje)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_mv_dX = deriv_sqrt_0_d0*(((dv*d_dv_dX+d_dv_dX*dv)+((4.0*modelStruct.modelPar_aje)*modelStruct.d_modelPar_aje_dX+4.0*modelStruct.d_modelPar_aje_dX*modelStruct.modelPar_aje)));
mv = value_sqrt_0;
}
d_vl_dX = (0.5*(d_dv_dX-d_mv_dX)-d_dv0_dX);
vl = ((0.5*(dv-mv))-dv0);
{
double value_pow_0 = pow((1.0-(vl/pe_t)),(1.0-modelStruct.modelPar_me));
double  deriv_pow_0_d0 = (((1.0-(vl/pe_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_me)/(1.0-(vl/pe_t))));
double  deriv_pow_0_d1 = ((1.0-(vl/pe_t)) == 0.0)?0.0:(log((1.0-(vl/pe_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_me)*((-pe_t)*((deriv_pow_0_d0*((-((pe_t*d_vl_dX-vl*d_pe_t_dX)/pe_t/pe_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_me_dX))))+(-d_pe_t_dX)*value_pow_0)-((-pe_t)*value_pow_0)*(-modelStruct.d_modelPar_me_dX))/(1.0-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_me));
qlo = (((-pe_t)*value_pow_0)/(1.0-modelStruct.modelPar_me));
}
{
double value_pow_0 = pow((1.0-modelStruct.modelPar_fc),(-modelStruct.modelPar_me));
double  deriv_pow_0_d0 = (((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_me)/(1.0-modelStruct.modelPar_fc)));
double  deriv_pow_0_d1 = ((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(log((1.0-modelStruct.modelPar_fc))*value_pow_0);
d_qdbex_dX = ((d_qlo_dX+((value_pow_0*((Vbex-vl)+vl0))*(((pe_t*(1.0-modelStruct.modelPar_fc))*((0.5*modelStruct.modelPar_me)*((d_Vbex_dX-d_vl_dX)+d_vl0_dX)+0.5*modelStruct.d_modelPar_me_dX*((Vbex-vl)+vl0))-((0.5*modelStruct.modelPar_me)*((Vbex-vl)+vl0))*(pe_t*(-modelStruct.d_modelPar_fc_dX)+d_pe_t_dX*(1.0-modelStruct.modelPar_fc)))/(pe_t*(1.0-modelStruct.modelPar_fc))/(pe_t*(1.0-modelStruct.modelPar_fc)))+(value_pow_0*((d_Vbex_dX-d_vl_dX)+d_vl0_dX)+((deriv_pow_0_d0*((-modelStruct.d_modelPar_fc_dX)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_me_dX))))*((Vbex-vl)+vl0))*(1.0+(((0.5*modelStruct.modelPar_me)*((Vbex-vl)+vl0))/(pe_t*(1.0-modelStruct.modelPar_fc))))))-d_q0_dX);
qdbex = ((qlo+((value_pow_0*((Vbex-vl)+vl0))*(1.0+(((0.5*modelStruct.modelPar_me)*((Vbex-vl)+vl0))/(pe_t*(1.0-modelStruct.modelPar_fc))))))-q0);
}
}
}
// End block qdbexBlock
//Begin block qdbepBlock
{
//Block-local variables for block qdbepBlock
double dv0=0.0;
double d_dv0_dX=0.0;
double dvh=0.0;
double d_dvh_dX=0.0;
double pwq=0.0;
double d_pwq_dX=0.0;
double qlo=0.0;
double d_qlo_dX=0.0;
double qhi=0.0;
double d_qhi_dX=0.0;
double vn0=0.0;
double d_vn0_dX=0.0;
double vnl0=0.0;
double d_vnl0_dX=0.0;
double vl0=0.0;
double d_vl0_dX=0.0;
double qlo0=0.0;
double d_qlo0_dX=0.0;
double vn=0.0;
double d_vn_dX=0.0;
double vnl=0.0;
double d_vnl_dX=0.0;
double vl=0.0;
double d_vl_dX=0.0;
double sel=0.0;
double d_sel_dX=0.0;
double crt=0.0;
double d_crt_dX=0.0;
double cmx=0.0;
double d_cmx_dX=0.0;
double cl=0.0;
double d_cl_dX=0.0;
double ql=0.0;
double d_ql_dX=0.0;
double mv0=0.0;
double d_mv0_dX=0.0;
double q0=0.0;
double d_q0_dX=0.0;
double dv=0.0;
double d_dv_dX=0.0;
double mv=0.0;
double d_mv_dX=0.0;
//End of Block-local variables
d_dv0_dX = ((-pc_t)*modelStruct.d_modelPar_fc_dX+(-d_pc_t_dX)*modelStruct.modelPar_fc);
dv0 = ((-pc_t)*modelStruct.modelPar_fc);
if ((modelStruct.modelPar_ajc<=0.0))
{
d_dvh_dX = (d_Vbep_dX+d_dv0_dX);
dvh = (Vbep+dv0);
if ((dvh>0.0))
{
{
double value_pow_0 = pow((1.0-modelStruct.modelPar_fc),((-1.0)-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(value_pow_0*((-1.0)-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_fc)));
double  deriv_pow_0_d1 = ((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(log((1.0-modelStruct.modelPar_fc))*value_pow_0);
d_pwq_dX = ((deriv_pow_0_d0*((-modelStruct.d_modelPar_fc_dX)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))));
pwq = value_pow_0;
}
d_qlo_dX = (((1.0-modelStruct.modelPar_mc)*(pc_t*(-((pwq*(1.0-modelStruct.modelPar_fc))*(-modelStruct.d_modelPar_fc_dX)+(pwq*(-modelStruct.d_modelPar_fc_dX)+d_pwq_dX*(1.0-modelStruct.modelPar_fc))*(1.0-modelStruct.modelPar_fc)))+d_pc_t_dX*(1.0-((pwq*(1.0-modelStruct.modelPar_fc))*(1.0-modelStruct.modelPar_fc))))-(pc_t*(1.0-((pwq*(1.0-modelStruct.modelPar_fc))*(1.0-modelStruct.modelPar_fc))))*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo = ((pc_t*(1.0-((pwq*(1.0-modelStruct.modelPar_fc))*(1.0-modelStruct.modelPar_fc))))/(1.0-modelStruct.modelPar_mc));
d_qhi_dX = ((dvh*((1.0-modelStruct.modelPar_fc)+(((0.5*modelStruct.modelPar_mc)*dvh)/pc_t)))*d_pwq_dX+(dvh*((-modelStruct.d_modelPar_fc_dX)+((pc_t*((0.5*modelStruct.modelPar_mc)*d_dvh_dX+0.5*modelStruct.d_modelPar_mc_dX*dvh)-((0.5*modelStruct.modelPar_mc)*dvh)*d_pc_t_dX)/pc_t/pc_t))+d_dvh_dX*((1.0-modelStruct.modelPar_fc)+(((0.5*modelStruct.modelPar_mc)*dvh)/pc_t)))*pwq);
qhi = ((dvh*((1.0-modelStruct.modelPar_fc)+(((0.5*modelStruct.modelPar_mc)*dvh)/pc_t)))*pwq);
}
else
{
if (((modelStruct.modelPar_vrt>0.0)&&(Vbep<(-modelStruct.modelPar_vrt))))
{
{
double value_pow_0 = pow((1.0+(modelStruct.modelPar_vrt/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0+(modelStruct.modelPar_vrt/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0+(modelStruct.modelPar_vrt/pc_t))));
double  deriv_pow_0_d1 = ((1.0+(modelStruct.modelPar_vrt/pc_t)) == 0.0)?0.0:(log((1.0+(modelStruct.modelPar_vrt/pc_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_mc)*(pc_t*(-(value_pow_0*(-(((pc_t+modelStruct.modelPar_vrt)*((1.0-modelStruct.modelPar_mc)*(d_Vbep_dX+modelStruct.d_modelPar_vrt_dX)+(-modelStruct.d_modelPar_mc_dX)*(Vbep+modelStruct.modelPar_vrt))-((1.0-modelStruct.modelPar_mc)*(Vbep+modelStruct.modelPar_vrt))*(d_pc_t_dX+modelStruct.d_modelPar_vrt_dX))/(pc_t+modelStruct.modelPar_vrt)/(pc_t+modelStruct.modelPar_vrt)))+((deriv_pow_0_d0*(((pc_t*modelStruct.d_modelPar_vrt_dX-modelStruct.modelPar_vrt*d_pc_t_dX)/pc_t/pc_t)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))))*(1.0-(((1.0-modelStruct.modelPar_mc)*(Vbep+modelStruct.modelPar_vrt))/(pc_t+modelStruct.modelPar_vrt)))))+d_pc_t_dX*(1.0-(value_pow_0*(1.0-(((1.0-modelStruct.modelPar_mc)*(Vbep+modelStruct.modelPar_vrt))/(pc_t+modelStruct.modelPar_vrt))))))-(pc_t*(1.0-(value_pow_0*(1.0-(((1.0-modelStruct.modelPar_mc)*(Vbep+modelStruct.modelPar_vrt))/(pc_t+modelStruct.modelPar_vrt))))))*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo = ((pc_t*(1.0-(value_pow_0*(1.0-(((1.0-modelStruct.modelPar_mc)*(Vbep+modelStruct.modelPar_vrt))/(pc_t+modelStruct.modelPar_vrt))))))/(1.0-modelStruct.modelPar_mc));
}
}
else
{
{
double value_pow_0 = pow((1.0-(Vbep/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-(Vbep/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0-(Vbep/pc_t))));
double  deriv_pow_0_d1 = ((1.0-(Vbep/pc_t)) == 0.0)?0.0:(log((1.0-(Vbep/pc_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_mc)*(pc_t*(-((deriv_pow_0_d0*((-((pc_t*d_Vbep_dX-Vbep*d_pc_t_dX)/pc_t/pc_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX)))))+d_pc_t_dX*(1.0-value_pow_0))-(pc_t*(1.0-value_pow_0))*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo = ((pc_t*(1.0-value_pow_0))/(1.0-modelStruct.modelPar_mc));
}
}
d_qhi_dX = 0.0;
qhi = 0.0;
}
d_qdbep_dX = (d_qlo_dX+d_qhi_dX);
qdbep = (qlo+qhi);
}
else
{
if (((modelStruct.modelPar_vrt>0.0)&&(modelStruct.modelPar_art>0.0)))
{
d_vn0_dX = (((modelStruct.modelPar_vrt-dv0)*(modelStruct.d_modelPar_vrt_dX+d_dv0_dX)-(modelStruct.modelPar_vrt+dv0)*(modelStruct.d_modelPar_vrt_dX-d_dv0_dX))/(modelStruct.modelPar_vrt-dv0)/(modelStruct.modelPar_vrt-dv0));
vn0 = ((modelStruct.modelPar_vrt+dv0)/(modelStruct.modelPar_vrt-dv0));
{
double value_sqrt_0 = sqrt((((vn0-1.0)*(vn0-1))+((4*modelStruct.modelPar_ajc)*modelStruct.modelPar_ajc)));
double value_sqrt_1 = sqrt((((vn0+1.0)*(vn0+1))+((4*modelStruct.modelPar_art)*modelStruct.modelPar_art)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);
d_vnl0_dX = (((value_sqrt_0+value_sqrt_1)*2.0*d_vn0_dX-(2.0*vn0)*(deriv_sqrt_0_d0*((((vn0-1.0)*d_vn0_dX+d_vn0_dX*(vn0-1))+((4*modelStruct.modelPar_ajc)*modelStruct.d_modelPar_ajc_dX+4*modelStruct.d_modelPar_ajc_dX*modelStruct.modelPar_ajc)))+deriv_sqrt_1_d0*((((vn0+1.0)*d_vn0_dX+d_vn0_dX*(vn0+1))+((4*modelStruct.modelPar_art)*modelStruct.d_modelPar_art_dX+4*modelStruct.d_modelPar_art_dX*modelStruct.modelPar_art)))))/(value_sqrt_0+value_sqrt_1)/(value_sqrt_0+value_sqrt_1));
vnl0 = ((2.0*vn0)/(value_sqrt_0+value_sqrt_1));
}
d_vl0_dX = 0.5*(((vnl0*(modelStruct.d_modelPar_vrt_dX-d_dv0_dX)+d_vnl0_dX*(modelStruct.modelPar_vrt-dv0))-modelStruct.d_modelPar_vrt_dX)-d_dv0_dX);
vl0 = (0.5*(((vnl0*(modelStruct.modelPar_vrt-dv0))-modelStruct.modelPar_vrt)-dv0));
{
double value_pow_0 = pow((1.0-(vl0/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-(vl0/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0-(vl0/pc_t))));
double  deriv_pow_0_d1 = ((1.0-(vl0/pc_t)) == 0.0)?0.0:(log((1.0-(vl0/pc_t)))*value_pow_0);
d_qlo0_dX = (((1.0-modelStruct.modelPar_mc)*(pc_t*(-((deriv_pow_0_d0*((-((pc_t*d_vl0_dX-vl0*d_pc_t_dX)/pc_t/pc_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX)))))+d_pc_t_dX*(1.0-value_pow_0))-(pc_t*(1.0-value_pow_0))*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo0 = ((pc_t*(1.0-value_pow_0))/(1.0-modelStruct.modelPar_mc));
}
d_vn_dX = (((modelStruct.modelPar_vrt-dv0)*((2*d_Vbep_dX+modelStruct.d_modelPar_vrt_dX)+d_dv0_dX)-(((2*Vbep)+modelStruct.modelPar_vrt)+dv0)*(modelStruct.d_modelPar_vrt_dX-d_dv0_dX))/(modelStruct.modelPar_vrt-dv0)/(modelStruct.modelPar_vrt-dv0));
vn = ((((2*Vbep)+modelStruct.modelPar_vrt)+dv0)/(modelStruct.modelPar_vrt-dv0));
{
double value_sqrt_0 = sqrt((((vn-1.0)*(vn-1))+((4*modelStruct.modelPar_ajc)*modelStruct.modelPar_ajc)));
double value_sqrt_1 = sqrt((((vn+1.0)*(vn+1))+((4*modelStruct.modelPar_art)*modelStruct.modelPar_art)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
double  deriv_sqrt_1_d0 = (0.5/value_sqrt_1);
d_vnl_dX = (((value_sqrt_0+value_sqrt_1)*2.0*d_vn_dX-(2.0*vn)*(deriv_sqrt_0_d0*((((vn-1.0)*d_vn_dX+d_vn_dX*(vn-1))+((4*modelStruct.modelPar_ajc)*modelStruct.d_modelPar_ajc_dX+4*modelStruct.d_modelPar_ajc_dX*modelStruct.modelPar_ajc)))+deriv_sqrt_1_d0*((((vn+1.0)*d_vn_dX+d_vn_dX*(vn+1))+((4*modelStruct.modelPar_art)*modelStruct.d_modelPar_art_dX+4*modelStruct.d_modelPar_art_dX*modelStruct.modelPar_art)))))/(value_sqrt_0+value_sqrt_1)/(value_sqrt_0+value_sqrt_1));
vnl = ((2.0*vn)/(value_sqrt_0+value_sqrt_1));
}
d_vl_dX = 0.5*(((vnl*(modelStruct.d_modelPar_vrt_dX-d_dv0_dX)+d_vnl_dX*(modelStruct.modelPar_vrt-dv0))-modelStruct.d_modelPar_vrt_dX)-d_dv0_dX);
vl = (0.5*(((vnl*(modelStruct.modelPar_vrt-dv0))-modelStruct.modelPar_vrt)-dv0));
{
double value_pow_0 = pow((1.0-(vl/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-(vl/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0-(vl/pc_t))));
double  deriv_pow_0_d1 = ((1.0-(vl/pc_t)) == 0.0)?0.0:(log((1.0-(vl/pc_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_mc)*(pc_t*(-((deriv_pow_0_d0*((-((pc_t*d_vl_dX-vl*d_pc_t_dX)/pc_t/pc_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX)))))+d_pc_t_dX*(1.0-value_pow_0))-(pc_t*(1.0-value_pow_0))*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo = ((pc_t*(1.0-value_pow_0))/(1.0-modelStruct.modelPar_mc));
}
d_sel_dX = 0.5*d_vnl_dX;
sel = (0.5*(vnl+1.0));
{
double value_pow_0 = pow((1.0+(modelStruct.modelPar_vrt/pc_t)),(-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0+(modelStruct.modelPar_vrt/pc_t)) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_mc)/(1.0+(modelStruct.modelPar_vrt/pc_t))));
double  deriv_pow_0_d1 = ((1.0+(modelStruct.modelPar_vrt/pc_t)) == 0.0)?0.0:(log((1.0+(modelStruct.modelPar_vrt/pc_t)))*value_pow_0);
d_crt_dX = ((deriv_pow_0_d0*(((pc_t*modelStruct.d_modelPar_vrt_dX-modelStruct.modelPar_vrt*d_pc_t_dX)/pc_t/pc_t)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))));
crt = value_pow_0;
}
{
double value_pow_0 = pow((1.0+(dv0/pc_t)),(-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0+(dv0/pc_t)) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_mc)/(1.0+(dv0/pc_t))));
double  deriv_pow_0_d1 = ((1.0+(dv0/pc_t)) == 0.0)?0.0:(log((1.0+(dv0/pc_t)))*value_pow_0);
d_cmx_dX = ((deriv_pow_0_d0*(((pc_t*d_dv0_dX-dv0*d_pc_t_dX)/pc_t/pc_t)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))));
cmx = value_pow_0;
}
d_cl_dX = (((1.0-sel)*d_crt_dX+(-d_sel_dX)*crt)+(sel*d_cmx_dX+d_sel_dX*cmx));
cl = (((1.0-sel)*crt)+(sel*cmx));
d_ql_dX = (((Vbep-vl)+vl0)*d_cl_dX+((d_Vbep_dX-d_vl_dX)+d_vl0_dX)*cl);
ql = (((Vbep-vl)+vl0)*cl);
d_qdbep_dX = ((d_ql_dX+d_qlo_dX)-d_qlo0_dX);
qdbep = ((ql+qlo)-qlo0);
}
else
{
{
double value_sqrt_0 = sqrt(((dv0*dv0)+((4*modelStruct.modelPar_ajc)*modelStruct.modelPar_ajc)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_mv0_dX = deriv_sqrt_0_d0*(((dv0*d_dv0_dX+d_dv0_dX*dv0)+((4*modelStruct.modelPar_ajc)*modelStruct.d_modelPar_ajc_dX+4*modelStruct.d_modelPar_ajc_dX*modelStruct.modelPar_ajc)));
mv0 = value_sqrt_0;
}
d_vl0_dX = (-0.5)*(d_dv0_dX+d_mv0_dX);
vl0 = ((-0.5)*(dv0+mv0));
{
double value_pow_0 = pow((1.0-(vl0/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-(vl0/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0-(vl0/pc_t))));
double  deriv_pow_0_d1 = ((1.0-(vl0/pc_t)) == 0.0)?0.0:(log((1.0-(vl0/pc_t)))*value_pow_0);
d_q0_dX = (((1.0-modelStruct.modelPar_mc)*((-pc_t)*((deriv_pow_0_d0*((-((pc_t*d_vl0_dX-vl0*d_pc_t_dX)/pc_t/pc_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))))+(-d_pc_t_dX)*value_pow_0)-((-pc_t)*value_pow_0)*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
q0 = (((-pc_t)*value_pow_0)/(1.0-modelStruct.modelPar_mc));
}
d_dv_dX = (d_Vbep_dX+d_dv0_dX);
dv = (Vbep+dv0);
{
double value_sqrt_0 = sqrt(((dv*dv)+((4*modelStruct.modelPar_ajc)*modelStruct.modelPar_ajc)));
double  deriv_sqrt_0_d0 = (0.5/value_sqrt_0);
d_mv_dX = deriv_sqrt_0_d0*(((dv*d_dv_dX+d_dv_dX*dv)+((4*modelStruct.modelPar_ajc)*modelStruct.d_modelPar_ajc_dX+4*modelStruct.d_modelPar_ajc_dX*modelStruct.modelPar_ajc)));
mv = value_sqrt_0;
}
d_vl_dX = (0.5*(d_dv_dX-d_mv_dX)-d_dv0_dX);
vl = ((0.5*(dv-mv))-dv0);
{
double value_pow_0 = pow((1.0-(vl/pc_t)),(1.0-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-(vl/pc_t)) == 0.0)?0.0:(value_pow_0*(1.0-modelStruct.modelPar_mc)/(1.0-(vl/pc_t))));
double  deriv_pow_0_d1 = ((1.0-(vl/pc_t)) == 0.0)?0.0:(log((1.0-(vl/pc_t)))*value_pow_0);
d_qlo_dX = (((1.0-modelStruct.modelPar_mc)*((-pc_t)*((deriv_pow_0_d0*((-((pc_t*d_vl_dX-vl*d_pc_t_dX)/pc_t/pc_t))))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))))+(-d_pc_t_dX)*value_pow_0)-((-pc_t)*value_pow_0)*(-modelStruct.d_modelPar_mc_dX))/(1.0-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_mc));
qlo = (((-pc_t)*value_pow_0)/(1.0-modelStruct.modelPar_mc));
}
{
double value_pow_0 = pow((1.0-modelStruct.modelPar_fc),(-modelStruct.modelPar_mc));
double  deriv_pow_0_d0 = (((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(value_pow_0*(-modelStruct.modelPar_mc)/(1.0-modelStruct.modelPar_fc)));
double  deriv_pow_0_d1 = ((1.0-modelStruct.modelPar_fc) == 0.0)?0.0:(log((1.0-modelStruct.modelPar_fc))*value_pow_0);
d_qdbep_dX = ((d_qlo_dX+(value_pow_0*((d_Vbep_dX-d_vl_dX)+d_vl0_dX)+((deriv_pow_0_d0*((-modelStruct.d_modelPar_fc_dX)))+(deriv_pow_0_d1*((-modelStruct.d_modelPar_mc_dX))))*((Vbep-vl)+vl0)))-d_q0_dX);
qdbep = ((qlo+(value_pow_0*((Vbep-vl)+vl0)))-q0);
}
}
}
}
// End block qdbepBlock
d_sgIf_dX = 0.0;
sgIf = ((Ifi>0.0)?1.0:0.0);
d_rIf_dX = ((Ifi*sgIf)*modelStruct.d_modelVar_Iitf_dX+(Ifi*d_sgIf_dX+d_Ifi_dX*sgIf)*modelStruct.modelVar_Iitf);
rIf = ((Ifi*sgIf)*modelStruct.modelVar_Iitf);
d_mIf_dX = (((rIf+1.0)*d_rIf_dX-rIf*d_rIf_dX)/(rIf+1.0)/(rIf+1.0));
mIf = (rIf/(rIf+1.0));
d_arg_dX = ((Vbci*modelStruct.d_modelVar_Ivtf_dX+d_Vbci_dX*modelStruct.modelVar_Ivtf)/1.44);
arg = ((Vbci*modelStruct.modelVar_Ivtf)/1.44);
if ((arg<modelStruct.modelVar_VmaxExp))
{
{
double value_exp_0 = exp(arg);
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = deriv_exp_0_d0*(d_arg_dX);
expi = value_exp_0;
}
}
else
{
{
double value_exp_0 = exp(modelStruct.modelVar_VmaxExp);
double  deriv_exp_0_d0 = value_exp_0;
d_expi_dX = (value_exp_0*(d_arg_dX-modelStruct.d_modelVar_VmaxExp_dX)+deriv_exp_0_d0*(modelStruct.d_modelVar_VmaxExp_dX)*(1.0+(arg-modelStruct.modelVar_VmaxExp)));
expi = (value_exp_0*(1.0+(arg-modelStruct.modelVar_VmaxExp)));
}
}
d_tff_dX = ((modelStruct.modelPar_tf*(1.0+(modelStruct.modelPar_qtf*q1)))*(((modelStruct.modelPar_xtf*expi)*(modelStruct.modelVar_sltf+(mIf*mIf)))*d_sgIf_dX+((modelStruct.modelPar_xtf*expi)*(modelStruct.d_modelVar_sltf_dX+(mIf*d_mIf_dX+d_mIf_dX*mIf))+(modelStruct.modelPar_xtf*d_expi_dX+modelStruct.d_modelPar_xtf_dX*expi)*(modelStruct.modelVar_sltf+(mIf*mIf)))*sgIf)+(modelStruct.modelPar_tf*(modelStruct.modelPar_qtf*d_q1_dX+modelStruct.d_modelPar_qtf_dX*q1)+modelStruct.d_modelPar_tf_dX*(1.0+(modelStruct.modelPar_qtf*q1)))*(1.0+(((modelStruct.modelPar_xtf*expi)*(modelStruct.modelVar_sltf+(mIf*mIf)))*sgIf)));
tff = ((modelStruct.modelPar_tf*(1.0+(modelStruct.modelPar_qtf*q1)))*(1.0+(((modelStruct.modelPar_xtf*expi)*(modelStruct.modelVar_sltf+(mIf*mIf)))*sgIf)));
d_Qbe_dX = (((cje_t*qdbe)*modelStruct.d_modelPar_wbe_dX+(cje_t*d_qdbe_dX+d_cje_t_dX*qdbe)*modelStruct.modelPar_wbe)+((instanceStruct.instanceVar_qb*(tff*d_Ifi_dX+d_tff_dX*Ifi)-(tff*Ifi)*instanceStruct.d_instanceVar_qb_dX)/instanceStruct.instanceVar_qb/instanceStruct.instanceVar_qb));
Qbe = (((cje_t*qdbe)*modelStruct.modelPar_wbe)+((tff*Ifi)/instanceStruct.instanceVar_qb));
d_Qbex_dX = ((cje_t*qdbex)*(-modelStruct.d_modelPar_wbe_dX)+(cje_t*d_qdbex_dX+d_cje_t_dX*qdbex)*(1.0-modelStruct.modelPar_wbe));
Qbex = ((cje_t*qdbex)*(1.0-modelStruct.modelPar_wbe));
d_Qbc_dX = (((cjc_t*d_qdbc_dX+d_cjc_t_dX*qdbc)+(modelStruct.modelPar_tr*d_Iri_dX+modelStruct.d_modelPar_tr_dX*Iri))+(modelStruct.modelPar_qco*d_Kbci_dX+modelStruct.d_modelPar_qco_dX*Kbci));
Qbc = (((cjc_t*qdbc)+(modelStruct.modelPar_tr*Iri))+(modelStruct.modelPar_qco*Kbci));
d_Qbcx_dX = (modelStruct.modelPar_qco*d_Kbcx_dX+modelStruct.d_modelPar_qco_dX*Kbcx);
Qbcx = (modelStruct.modelPar_qco*Kbcx);
d_Qbep_dX = ((cjep_t*d_qdbep_dX+d_cjep_t_dX*qdbep)+(modelStruct.modelPar_tr*d_Ifp_dX+modelStruct.d_modelPar_tr_dX*Ifp));
Qbep = ((cjep_t*qdbep)+(modelStruct.modelPar_tr*Ifp));
d_Qbcp_dX = ((cjcp_t*d_qdbcp_dX+d_cjcp_t_dX*qdbcp)+(modelStruct.modelPar_ccso*d_Vbcp_dX+modelStruct.d_modelPar_ccso_dX*Vbcp));
Qbcp = ((cjcp_t*qdbcp)+(modelStruct.modelPar_ccso*Vbcp));
d_Qbeo_dX = (Vbe*modelStruct.d_modelPar_cbeo_dX+d_Vbe_dX*modelStruct.modelPar_cbeo);
Qbeo = (Vbe*modelStruct.modelPar_cbeo);
d_Qbco_dX = Vbc*modelStruct.d_modelPar_cbco_dX;
Qbco = (Vbc*modelStruct.modelPar_cbco);
d_Qcth_dX = dt_et*modelStruct.d_modelPar_cth_dX;
Qcth = (dt_et*modelStruct.modelPar_cth);
d_Qxf1_dX = modelStruct.d_modelPar_td_dX*Vxf1;
Qxf1 = (modelStruct.modelPar_td*Vxf1);
d_Qxf2_dX = modelStruct.d_modelPar_td_dX*Vxf2*0.3333333333333333;
Qxf2 = ((modelStruct.modelPar_td*Vxf2)*0.3333333333333333);
d_Qbe_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*d_Qbe_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*Qbe);
Qbe = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*Qbe);
d_Qbex_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*d_Qbex_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*Qbex);
Qbex = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*Qbex);
d_Qbc_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*d_Qbc_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*Qbc);
Qbc = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*Qbc);
d_Qbcx_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*d_Qbcx_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*Qbcx);
Qbcx = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*Qbcx);
d_Qbep_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*d_Qbep_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*Qbep);
Qbep = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*Qbep);
d_Qbeo_dX = (instanceStruct.instanceVar_mMod*d_Qbeo_dX+instanceStruct.d_instanceVar_mMod_dX*Qbeo);
Qbeo = (instanceStruct.instanceVar_mMod*Qbeo);
d_Qbco_dX = (instanceStruct.instanceVar_mMod*d_Qbco_dX+instanceStruct.d_instanceVar_mMod_dX*Qbco);
Qbco = (instanceStruct.instanceVar_mMod*Qbco);
d_Qbcp_dX = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*d_Qbcp_dX+modelStruct.modelPar_VBICtype*instanceStruct.d_instanceVar_mMod_dX*Qbcp);
Qbcp = ((modelStruct.modelPar_VBICtype*instanceStruct.instanceVar_mMod)*Qbcp);
d_Qcth_dX = (instanceStruct.instanceVar_mMod*d_Qcth_dX+instanceStruct.d_instanceVar_mMod_dX*Qcth);
Qcth = (instanceStruct.instanceVar_mMod*Qcth);
}
// End block evaluateDynamic
//Begin block loadStatic
{
// I(bi,ei) <+ (Ibe)
d_staticContributions_dX[admsNodeID_bi]+= instanceStruct.d_instanceVar_Ibe_dX;
d_staticContributions_dX[(admsNodeID_ei)]-= instanceStruct.d_instanceVar_Ibe_dX;
// I(bx,ei) <+ (Ibex)
d_staticContributions_dX[admsNodeID_bx]+= instanceStruct.d_instanceVar_Ibex_dX;
d_staticContributions_dX[(admsNodeID_ei)]-= instanceStruct.d_instanceVar_Ibex_dX;
// I(ci,ei) <+ (Itxf)
d_staticContributions_dX[admsNodeID_ci]+= d_Itxf_dX;
d_staticContributions_dX[(admsNodeID_ei)]-= d_Itxf_dX;
// I(ei,ci) <+ (Itzr)
d_staticContributions_dX[admsNodeID_ei]+= d_Itzr_dX;
d_staticContributions_dX[(admsNodeID_ci)]-= d_Itzr_dX;
// I(bi,ci) <+ (Ibc)
d_staticContributions_dX[admsNodeID_bi]+= d_Ibc_dX;
d_staticContributions_dX[(admsNodeID_ci)]-= d_Ibc_dX;
// I(bx,cx) <+ (Igcx)
d_staticContributions_dX[admsNodeID_bx]+= d_Igcx_dX;
d_staticContributions_dX[(admsNodeID_cx)]-= d_Igcx_dX;
// I(bx,bp) <+ (Ibep)
d_staticContributions_dX[admsNodeID_bx]+= instanceStruct.d_instanceVar_Ibep_dX;
d_staticContributions_dX[(admsNodeID_bp)]-= instanceStruct.d_instanceVar_Ibep_dX;
// I(c,cx) <+ (Ircx)
d_staticContributions_dX[admsNodeID_c]+= d_Ircx_dX;
d_staticContributions_dX[(admsNodeID_cx)]-= d_Ircx_dX;
// I(cx,ci) <+ (Irci)
d_staticContributions_dX[admsNodeID_cx]+= instanceStruct.d_instanceVar_Irci_dX;
d_staticContributions_dX[(admsNodeID_ci)]-= instanceStruct.d_instanceVar_Irci_dX;
// I(b,bx) <+ (Irbx)
d_staticContributions_dX[admsNodeID_b]+= d_Irbx_dX;
d_staticContributions_dX[(admsNodeID_bx)]-= d_Irbx_dX;
// I(bx,bi) <+ (Irbi)
d_staticContributions_dX[admsNodeID_bx]+= d_Irbi_dX;
d_staticContributions_dX[(admsNodeID_bi)]-= d_Irbi_dX;
// I(e,ei) <+ (Ire)
d_staticContributions_dX[admsNodeID_e]+= d_Ire_dX;
d_staticContributions_dX[(admsNodeID_ei)]-= d_Ire_dX;
// I(bp,cx) <+ (Irbp)
d_staticContributions_dX[admsNodeID_bp]+= d_Irbp_dX;
d_staticContributions_dX[(admsNodeID_cx)]-= d_Irbp_dX;
// I(si,bp) <+ (Ibcp)
d_staticContributions_dX[admsNodeID_si]+= d_Ibcp_dX;
d_staticContributions_dX[(admsNodeID_bp)]-= d_Ibcp_dX;
// I(bx,si) <+ (Iccp)
d_staticContributions_dX[admsNodeID_bx]+= instanceStruct.d_instanceVar_Iccp_dX;
d_staticContributions_dX[(admsNodeID_si)]-= instanceStruct.d_instanceVar_Iccp_dX;
// I(s,si) <+ (Irs)
d_staticContributions_dX[admsNodeID_s]+= d_Irs_dX;
d_staticContributions_dX[(admsNodeID_si)]-= d_Irs_dX;
// I(xf1,GND) <+ (Ixf1)
d_staticContributions_dX[admsNodeID_xf1]+= d_Ixf1_dX;
// I(xf2,GND) <+ (Ixf2)
d_staticContributions_dX[admsNodeID_xf2]+= 0.0;
// Pwr(dt,GND) <+ (Irth)
d_staticContributions_dX[admsNodeID_dt]+= d_Irth_dX;
// Pwr(dt,GND) <+ (Ith)
d_staticContributions_dX[admsNodeID_dt]+= d_Ith_dX;
}
// End block loadStatic
//Begin block loadDynamic
{
// I(bi,ei) <+ (ddt(Qbe))
d_dynamicContributions_dX[admsNodeID_bi]+= (d_Qbe_dX);
d_dynamicContributions_dX[(admsNodeID_ei)]-= (d_Qbe_dX);
// I(bx,ei) <+ (ddt(Qbex))
d_dynamicContributions_dX[admsNodeID_bx]+= (d_Qbex_dX);
d_dynamicContributions_dX[(admsNodeID_ei)]-= (d_Qbex_dX);
// I(bi,ci) <+ (ddt(Qbc))
d_dynamicContributions_dX[admsNodeID_bi]+= (d_Qbc_dX);
d_dynamicContributions_dX[(admsNodeID_ci)]-= (d_Qbc_dX);
// I(bi,cx) <+ (ddt(Qbcx))
d_dynamicContributions_dX[admsNodeID_bi]+= (d_Qbcx_dX);
d_dynamicContributions_dX[(admsNodeID_cx)]-= (d_Qbcx_dX);
// I(bx,bp) <+ (ddt(Qbep))
d_dynamicContributions_dX[admsNodeID_bx]+= (d_Qbep_dX);
d_dynamicContributions_dX[(admsNodeID_bp)]-= (d_Qbep_dX);
// I(b,e) <+ (ddt(Qbeo))
d_dynamicContributions_dX[admsNodeID_b]+= (d_Qbeo_dX);
d_dynamicContributions_dX[(admsNodeID_e)]-= (d_Qbeo_dX);
// I(b,c) <+ (ddt(Qbco))
d_dynamicContributions_dX[admsNodeID_b]+= (d_Qbco_dX);
d_dynamicContributions_dX[(admsNodeID_c)]-= (d_Qbco_dX);
// I(si,bp) <+ (ddt(Qbcp))
d_dynamicContributions_dX[admsNodeID_si]+= (d_Qbcp_dX);
d_dynamicContributions_dX[(admsNodeID_bp)]-= (d_Qbcp_dX);
// I(xf1,GND) <+ (ddt(Qxf1))
d_dynamicContributions_dX[admsNodeID_xf1]+= (d_Qxf1_dX);
// I(xf2,GND) <+ (ddt(Qxf2))
d_dynamicContributions_dX[admsNodeID_xf2]+= (d_Qxf2_dX);
// Pwr(dt,GND) <+ (ddt(Qcth))
d_dynamicContributions_dX[admsNodeID_dt]+= (d_Qcth_dX);
}
// End block loadDynamic
}



//-----------------------------------------------------------------------------
// Function      : InstanceSensitivity::operator()
// Purpose       : return sensitivity for a single instance parameter
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
/// Compute sensitivity of a device instance's outputs to a specified instance
/// parameter
///
///
/// @param[in] entity  The device entity that owns the parameter
/// @param[in] name    The unadorned parameter name specific to the entity
/// @param[out] dfdp   The derivative of the F vector with respect to the parameter
/// @param[out] dqdp   The derivative of the Q vector with respect to the parameter
/// @param[out] dbdp   The derivative of the B vector with respect to the parameter
/// @param[out] Findices   The indices into the F vector corresponding to the elements of dfdp
/// @param[out] Qindices   The indices into the Q vector corresponding to the elements of dfdp
/// @param[out] Bindices   The indices into the B vector corresponding to the elements of dfdp
///
///
void InstanceSensitivity::operator()
(
const ParameterBase &entity,
const std::string &name,
std::vector<double> & dfdp,
std::vector<double> & dqdp,
std::vector<double> & dbdp,
std::vector<int> & Findices,
std::vector<int> & Qindices,
std::vector<int> & Bindices
) const
{
const ParameterBase * e1 = &entity;
const Instance & in = *(dynamic_cast<const Instance *> (e1));
const Model & mod =in.model_;

dfdp.resize(14+0);
dqdp.resize(14+0);
Findices.resize(14+0);
Qindices.resize(14+0);

std::vector <double> probeVars(21);
std::vector <double> d_staticContributions_dX(14+0);
std::vector <double> d_dynamicContributions_dX(14+0);


// initialize contributions to zero (automatically sets derivatives to zero)
for (int i=0; i < 14+0 ; ++i)
{
   d_staticContributions_dX[i]=0;
   d_dynamicContributions_dX[i]=0;
}

// Copy out all the model parameters (doubles) into local structure
modelSensStruct modelStruct;

//reals
modelStruct.modelPar_npn=mod.npn;
modelStruct.d_modelPar_npn_dX=0.0;
modelStruct.modelPar_given_npn=mod.given("npn");
modelStruct.modelPar_pnp=mod.pnp;
modelStruct.d_modelPar_pnp_dX=0.0;
modelStruct.modelPar_given_pnp=mod.given("pnp");
modelStruct.modelPar_scale=mod.scale;
modelStruct.d_modelPar_scale_dX=0.0;
modelStruct.modelPar_given_scale=mod.given("scale");
modelStruct.modelPar_shrink=mod.shrink;
modelStruct.d_modelPar_shrink_dX=0.0;
modelStruct.modelPar_given_shrink=mod.given("shrink");
modelStruct.modelPar_tmin=mod.tmin;
modelStruct.d_modelPar_tmin_dX=0.0;
modelStruct.modelPar_given_tmin=mod.given("tmin");
modelStruct.modelPar_tmax=mod.tmax;
modelStruct.d_modelPar_tmax_dX=0.0;
modelStruct.modelPar_given_tmax=mod.given("tmax");
modelStruct.modelPar_gmin=mod.gmin;
modelStruct.d_modelPar_gmin_dX=0.0;
modelStruct.modelPar_given_gmin=mod.given("gmin");
modelStruct.modelPar_pnjmaxi=mod.pnjmaxi;
modelStruct.d_modelPar_pnjmaxi_dX=0.0;
modelStruct.modelPar_given_pnjmaxi=mod.given("pnjmaxi");
modelStruct.modelPar_maxexp=mod.maxexp;
modelStruct.d_modelPar_maxexp_dX=0.0;
modelStruct.modelPar_given_maxexp=mod.given("maxexp");
modelStruct.modelPar_tnom=mod.tnom;
modelStruct.d_modelPar_tnom_dX=0.0;
modelStruct.modelPar_given_tnom=mod.given("tnom");
modelStruct.modelPar_tminclip=mod.tminclip;
modelStruct.d_modelPar_tminclip_dX=0.0;
modelStruct.modelPar_given_tminclip=mod.given("tminclip");
modelStruct.modelPar_tmaxclip=mod.tmaxclip;
modelStruct.d_modelPar_tmaxclip_dX=0.0;
modelStruct.modelPar_given_tmaxclip=mod.given("tmaxclip");
modelStruct.modelPar_rcx=mod.rcx;
modelStruct.d_modelPar_rcx_dX=0.0;
modelStruct.modelPar_given_rcx=mod.given("rcx");
modelStruct.modelPar_rci=mod.rci;
modelStruct.d_modelPar_rci_dX=0.0;
modelStruct.modelPar_given_rci=mod.given("rci");
modelStruct.modelPar_vo=mod.vo;
modelStruct.d_modelPar_vo_dX=0.0;
modelStruct.modelPar_given_vo=mod.given("vo");
modelStruct.modelPar_gamm=mod.gamm;
modelStruct.d_modelPar_gamm_dX=0.0;
modelStruct.modelPar_given_gamm=mod.given("gamm");
modelStruct.modelPar_hrcf=mod.hrcf;
modelStruct.d_modelPar_hrcf_dX=0.0;
modelStruct.modelPar_given_hrcf=mod.given("hrcf");
modelStruct.modelPar_rbx=mod.rbx;
modelStruct.d_modelPar_rbx_dX=0.0;
modelStruct.modelPar_given_rbx=mod.given("rbx");
modelStruct.modelPar_rbi=mod.rbi;
modelStruct.d_modelPar_rbi_dX=0.0;
modelStruct.modelPar_given_rbi=mod.given("rbi");
modelStruct.modelPar_re=mod.re;
modelStruct.d_modelPar_re_dX=0.0;
modelStruct.modelPar_given_re=mod.given("re");
modelStruct.modelPar_rs=mod.rs;
modelStruct.d_modelPar_rs_dX=0.0;
modelStruct.modelPar_given_rs=mod.given("rs");
modelStruct.modelPar_rbp=mod.rbp;
modelStruct.d_modelPar_rbp_dX=0.0;
modelStruct.modelPar_given_rbp=mod.given("rbp");
modelStruct.modelPar_is=mod.is;
modelStruct.d_modelPar_is_dX=0.0;
modelStruct.modelPar_given_is=mod.given("is");
modelStruct.modelPar_isrr=mod.isrr;
modelStruct.d_modelPar_isrr_dX=0.0;
modelStruct.modelPar_given_isrr=mod.given("isrr");
modelStruct.modelPar_nf=mod.nf;
modelStruct.d_modelPar_nf_dX=0.0;
modelStruct.modelPar_given_nf=mod.given("nf");
modelStruct.modelPar_nr=mod.nr;
modelStruct.d_modelPar_nr_dX=0.0;
modelStruct.modelPar_given_nr=mod.given("nr");
modelStruct.modelPar_isp=mod.isp;
modelStruct.d_modelPar_isp_dX=0.0;
modelStruct.modelPar_given_isp=mod.given("isp");
modelStruct.modelPar_wsp=mod.wsp;
modelStruct.d_modelPar_wsp_dX=0.0;
modelStruct.modelPar_given_wsp=mod.given("wsp");
modelStruct.modelPar_nfp=mod.nfp;
modelStruct.d_modelPar_nfp_dX=0.0;
modelStruct.modelPar_given_nfp=mod.given("nfp");
modelStruct.modelPar_fc=mod.fc;
modelStruct.d_modelPar_fc_dX=0.0;
modelStruct.modelPar_given_fc=mod.given("fc");
modelStruct.modelPar_cbeo=mod.cbeo;
modelStruct.d_modelPar_cbeo_dX=0.0;
modelStruct.modelPar_given_cbeo=mod.given("cbeo");
modelStruct.modelPar_cje=mod.cje;
modelStruct.d_modelPar_cje_dX=0.0;
modelStruct.modelPar_given_cje=mod.given("cje");
modelStruct.modelPar_pe=mod.pe;
modelStruct.d_modelPar_pe_dX=0.0;
modelStruct.modelPar_given_pe=mod.given("pe");
modelStruct.modelPar_me=mod.me;
modelStruct.d_modelPar_me_dX=0.0;
modelStruct.modelPar_given_me=mod.given("me");
modelStruct.modelPar_aje=mod.aje;
modelStruct.d_modelPar_aje_dX=0.0;
modelStruct.modelPar_given_aje=mod.given("aje");
modelStruct.modelPar_cbco=mod.cbco;
modelStruct.d_modelPar_cbco_dX=0.0;
modelStruct.modelPar_given_cbco=mod.given("cbco");
modelStruct.modelPar_cjc=mod.cjc;
modelStruct.d_modelPar_cjc_dX=0.0;
modelStruct.modelPar_given_cjc=mod.given("cjc");
modelStruct.modelPar_pc=mod.pc;
modelStruct.d_modelPar_pc_dX=0.0;
modelStruct.modelPar_given_pc=mod.given("pc");
modelStruct.modelPar_mc=mod.mc;
modelStruct.d_modelPar_mc_dX=0.0;
modelStruct.modelPar_given_mc=mod.given("mc");
modelStruct.modelPar_ajc=mod.ajc;
modelStruct.d_modelPar_ajc_dX=0.0;
modelStruct.modelPar_given_ajc=mod.given("ajc");
modelStruct.modelPar_vrt=mod.vrt;
modelStruct.d_modelPar_vrt_dX=0.0;
modelStruct.modelPar_given_vrt=mod.given("vrt");
modelStruct.modelPar_art=mod.art;
modelStruct.d_modelPar_art_dX=0.0;
modelStruct.modelPar_given_art=mod.given("art");
modelStruct.modelPar_qco=mod.qco;
modelStruct.d_modelPar_qco_dX=0.0;
modelStruct.modelPar_given_qco=mod.given("qco");
modelStruct.modelPar_cjep=mod.cjep;
modelStruct.d_modelPar_cjep_dX=0.0;
modelStruct.modelPar_given_cjep=mod.given("cjep");
modelStruct.modelPar_cjcp=mod.cjcp;
modelStruct.d_modelPar_cjcp_dX=0.0;
modelStruct.modelPar_given_cjcp=mod.given("cjcp");
modelStruct.modelPar_ps=mod.ps;
modelStruct.d_modelPar_ps_dX=0.0;
modelStruct.modelPar_given_ps=mod.given("ps");
modelStruct.modelPar_ms=mod.ms;
modelStruct.d_modelPar_ms_dX=0.0;
modelStruct.modelPar_given_ms=mod.given("ms");
modelStruct.modelPar_ajs=mod.ajs;
modelStruct.d_modelPar_ajs_dX=0.0;
modelStruct.modelPar_given_ajs=mod.given("ajs");
modelStruct.modelPar_ccso=mod.ccso;
modelStruct.d_modelPar_ccso_dX=0.0;
modelStruct.modelPar_given_ccso=mod.given("ccso");
modelStruct.modelPar_ibei=mod.ibei;
modelStruct.d_modelPar_ibei_dX=0.0;
modelStruct.modelPar_given_ibei=mod.given("ibei");
modelStruct.modelPar_wbe=mod.wbe;
modelStruct.d_modelPar_wbe_dX=0.0;
modelStruct.modelPar_given_wbe=mod.given("wbe");
modelStruct.modelPar_nei=mod.nei;
modelStruct.d_modelPar_nei_dX=0.0;
modelStruct.modelPar_given_nei=mod.given("nei");
modelStruct.modelPar_qnibeir=mod.qnibeir;
modelStruct.d_modelPar_qnibeir_dX=0.0;
modelStruct.modelPar_given_qnibeir=mod.given("qnibeir");
modelStruct.modelPar_iben=mod.iben;
modelStruct.d_modelPar_iben_dX=0.0;
modelStruct.modelPar_given_iben=mod.given("iben");
modelStruct.modelPar_nen=mod.nen;
modelStruct.d_modelPar_nen_dX=0.0;
modelStruct.modelPar_given_nen=mod.given("nen");
modelStruct.modelPar_ibci=mod.ibci;
modelStruct.d_modelPar_ibci_dX=0.0;
modelStruct.modelPar_given_ibci=mod.given("ibci");
modelStruct.modelPar_nci=mod.nci;
modelStruct.d_modelPar_nci_dX=0.0;
modelStruct.modelPar_given_nci=mod.given("nci");
modelStruct.modelPar_ibcn=mod.ibcn;
modelStruct.d_modelPar_ibcn_dX=0.0;
modelStruct.modelPar_given_ibcn=mod.given("ibcn");
modelStruct.modelPar_ncn=mod.ncn;
modelStruct.d_modelPar_ncn_dX=0.0;
modelStruct.modelPar_given_ncn=mod.given("ncn");
modelStruct.modelPar_ibeip=mod.ibeip;
modelStruct.d_modelPar_ibeip_dX=0.0;
modelStruct.modelPar_given_ibeip=mod.given("ibeip");
modelStruct.modelPar_ibenp=mod.ibenp;
modelStruct.d_modelPar_ibenp_dX=0.0;
modelStruct.modelPar_given_ibenp=mod.given("ibenp");
modelStruct.modelPar_ibcip=mod.ibcip;
modelStruct.d_modelPar_ibcip_dX=0.0;
modelStruct.modelPar_given_ibcip=mod.given("ibcip");
modelStruct.modelPar_ncip=mod.ncip;
modelStruct.d_modelPar_ncip_dX=0.0;
modelStruct.modelPar_given_ncip=mod.given("ncip");
modelStruct.modelPar_ibcnp=mod.ibcnp;
modelStruct.d_modelPar_ibcnp_dX=0.0;
modelStruct.modelPar_given_ibcnp=mod.given("ibcnp");
modelStruct.modelPar_ncnp=mod.ncnp;
modelStruct.d_modelPar_ncnp_dX=0.0;
modelStruct.modelPar_given_ncnp=mod.given("ncnp");
modelStruct.modelPar_vef=mod.vef;
modelStruct.d_modelPar_vef_dX=0.0;
modelStruct.modelPar_given_vef=mod.given("vef");
modelStruct.modelPar_ver=mod.ver;
modelStruct.d_modelPar_ver_dX=0.0;
modelStruct.modelPar_given_ver=mod.given("ver");
modelStruct.modelPar_ikf=mod.ikf;
modelStruct.d_modelPar_ikf_dX=0.0;
modelStruct.modelPar_given_ikf=mod.given("ikf");
modelStruct.modelPar_nkf=mod.nkf;
modelStruct.d_modelPar_nkf_dX=0.0;
modelStruct.modelPar_given_nkf=mod.given("nkf");
modelStruct.modelPar_ikr=mod.ikr;
modelStruct.d_modelPar_ikr_dX=0.0;
modelStruct.modelPar_given_ikr=mod.given("ikr");
modelStruct.modelPar_ikp=mod.ikp;
modelStruct.d_modelPar_ikp_dX=0.0;
modelStruct.modelPar_given_ikp=mod.given("ikp");
modelStruct.modelPar_tf=mod.tf;
modelStruct.d_modelPar_tf_dX=0.0;
modelStruct.modelPar_given_tf=mod.given("tf");
modelStruct.modelPar_qtf=mod.qtf;
modelStruct.d_modelPar_qtf_dX=0.0;
modelStruct.modelPar_given_qtf=mod.given("qtf");
modelStruct.modelPar_xtf=mod.xtf;
modelStruct.d_modelPar_xtf_dX=0.0;
modelStruct.modelPar_given_xtf=mod.given("xtf");
modelStruct.modelPar_vtf=mod.vtf;
modelStruct.d_modelPar_vtf_dX=0.0;
modelStruct.modelPar_given_vtf=mod.given("vtf");
modelStruct.modelPar_itf=mod.itf;
modelStruct.d_modelPar_itf_dX=0.0;
modelStruct.modelPar_given_itf=mod.given("itf");
modelStruct.modelPar_tr=mod.tr;
modelStruct.d_modelPar_tr_dX=0.0;
modelStruct.modelPar_given_tr=mod.given("tr");
modelStruct.modelPar_td=mod.td;
modelStruct.d_modelPar_td_dX=0.0;
modelStruct.modelPar_given_td=mod.given("td");
modelStruct.modelPar_avc1=mod.avc1;
modelStruct.d_modelPar_avc1_dX=0.0;
modelStruct.modelPar_given_avc1=mod.given("avc1");
modelStruct.modelPar_avc2=mod.avc2;
modelStruct.d_modelPar_avc2_dX=0.0;
modelStruct.modelPar_given_avc2=mod.given("avc2");
modelStruct.modelPar_avcx1=mod.avcx1;
modelStruct.d_modelPar_avcx1_dX=0.0;
modelStruct.modelPar_given_avcx1=mod.given("avcx1");
modelStruct.modelPar_avcx2=mod.avcx2;
modelStruct.d_modelPar_avcx2_dX=0.0;
modelStruct.modelPar_given_avcx2=mod.given("avcx2");
modelStruct.modelPar_mcx=mod.mcx;
modelStruct.d_modelPar_mcx_dX=0.0;
modelStruct.modelPar_given_mcx=mod.given("mcx");
modelStruct.modelPar_vbbe=mod.vbbe;
modelStruct.d_modelPar_vbbe_dX=0.0;
modelStruct.modelPar_given_vbbe=mod.given("vbbe");
modelStruct.modelPar_nbbe=mod.nbbe;
modelStruct.d_modelPar_nbbe_dX=0.0;
modelStruct.modelPar_given_nbbe=mod.given("nbbe");
modelStruct.modelPar_ibbe=mod.ibbe;
modelStruct.d_modelPar_ibbe_dX=0.0;
modelStruct.modelPar_given_ibbe=mod.given("ibbe");
modelStruct.modelPar_tvbbe1=mod.tvbbe1;
modelStruct.d_modelPar_tvbbe1_dX=0.0;
modelStruct.modelPar_given_tvbbe1=mod.given("tvbbe1");
modelStruct.modelPar_tvbbe2=mod.tvbbe2;
modelStruct.d_modelPar_tvbbe2_dX=0.0;
modelStruct.modelPar_given_tvbbe2=mod.given("tvbbe2");
modelStruct.modelPar_tnbbe=mod.tnbbe;
modelStruct.d_modelPar_tnbbe_dX=0.0;
modelStruct.modelPar_given_tnbbe=mod.given("tnbbe");
modelStruct.modelPar_vpte=mod.vpte;
modelStruct.d_modelPar_vpte_dX=0.0;
modelStruct.modelPar_given_vpte=mod.given("vpte");
modelStruct.modelPar_ibk0=mod.ibk0;
modelStruct.d_modelPar_ibk0_dX=0.0;
modelStruct.modelPar_given_ibk0=mod.given("ibk0");
modelStruct.modelPar_abk=mod.abk;
modelStruct.d_modelPar_abk_dX=0.0;
modelStruct.modelPar_given_abk=mod.given("abk");
modelStruct.modelPar_bbk=mod.bbk;
modelStruct.d_modelPar_bbk_dX=0.0;
modelStruct.modelPar_given_bbk=mod.given("bbk");
modelStruct.modelPar_kfn=mod.kfn;
modelStruct.d_modelPar_kfn_dX=0.0;
modelStruct.modelPar_given_kfn=mod.given("kfn");
modelStruct.modelPar_afn=mod.afn;
modelStruct.d_modelPar_afn_dX=0.0;
modelStruct.modelPar_given_afn=mod.given("afn");
modelStruct.modelPar_bfn=mod.bfn;
modelStruct.d_modelPar_bfn_dX=0.0;
modelStruct.modelPar_given_bfn=mod.given("bfn");
modelStruct.modelPar_rth=mod.rth;
modelStruct.d_modelPar_rth_dX=0.0;
modelStruct.modelPar_given_rth=mod.given("rth");
modelStruct.modelPar_cth=mod.cth;
modelStruct.d_modelPar_cth_dX=0.0;
modelStruct.modelPar_given_cth=mod.given("cth");
modelStruct.modelPar_xre=mod.xre;
modelStruct.d_modelPar_xre_dX=0.0;
modelStruct.modelPar_given_xre=mod.given("xre");
modelStruct.modelPar_xrb=mod.xrb;
modelStruct.d_modelPar_xrb_dX=0.0;
modelStruct.modelPar_given_xrb=mod.given("xrb");
modelStruct.modelPar_xrbi=mod.xrbi;
modelStruct.d_modelPar_xrbi_dX=0.0;
modelStruct.modelPar_given_xrbi=mod.given("xrbi");
modelStruct.modelPar_xrbx=mod.xrbx;
modelStruct.d_modelPar_xrbx_dX=0.0;
modelStruct.modelPar_given_xrbx=mod.given("xrbx");
modelStruct.modelPar_xrc=mod.xrc;
modelStruct.d_modelPar_xrc_dX=0.0;
modelStruct.modelPar_given_xrc=mod.given("xrc");
modelStruct.modelPar_xrci=mod.xrci;
modelStruct.d_modelPar_xrci_dX=0.0;
modelStruct.modelPar_given_xrci=mod.given("xrci");
modelStruct.modelPar_xrcx=mod.xrcx;
modelStruct.d_modelPar_xrcx_dX=0.0;
modelStruct.modelPar_given_xrcx=mod.given("xrcx");
modelStruct.modelPar_xrbp=mod.xrbp;
modelStruct.d_modelPar_xrbp_dX=0.0;
modelStruct.modelPar_given_xrbp=mod.given("xrbp");
modelStruct.modelPar_xrs=mod.xrs;
modelStruct.d_modelPar_xrs_dX=0.0;
modelStruct.modelPar_given_xrs=mod.given("xrs");
modelStruct.modelPar_xvo=mod.xvo;
modelStruct.d_modelPar_xvo_dX=0.0;
modelStruct.modelPar_given_xvo=mod.given("xvo");
modelStruct.modelPar_ea=mod.ea;
modelStruct.d_modelPar_ea_dX=0.0;
modelStruct.modelPar_given_ea=mod.given("ea");
modelStruct.modelPar_eaie=mod.eaie;
modelStruct.d_modelPar_eaie_dX=0.0;
modelStruct.modelPar_given_eaie=mod.given("eaie");
modelStruct.modelPar_eaic=mod.eaic;
modelStruct.d_modelPar_eaic_dX=0.0;
modelStruct.modelPar_given_eaic=mod.given("eaic");
modelStruct.modelPar_eais=mod.eais;
modelStruct.d_modelPar_eais_dX=0.0;
modelStruct.modelPar_given_eais=mod.given("eais");
modelStruct.modelPar_eane=mod.eane;
modelStruct.d_modelPar_eane_dX=0.0;
modelStruct.modelPar_given_eane=mod.given("eane");
modelStruct.modelPar_eanc=mod.eanc;
modelStruct.d_modelPar_eanc_dX=0.0;
modelStruct.modelPar_given_eanc=mod.given("eanc");
modelStruct.modelPar_eans=mod.eans;
modelStruct.d_modelPar_eans_dX=0.0;
modelStruct.modelPar_given_eans=mod.given("eans");
modelStruct.modelPar_eap=mod.eap;
modelStruct.d_modelPar_eap_dX=0.0;
modelStruct.modelPar_given_eap=mod.given("eap");
modelStruct.modelPar_dear=mod.dear;
modelStruct.d_modelPar_dear_dX=0.0;
modelStruct.modelPar_given_dear=mod.given("dear");
modelStruct.modelPar_xis=mod.xis;
modelStruct.d_modelPar_xis_dX=0.0;
modelStruct.modelPar_given_xis=mod.given("xis");
modelStruct.modelPar_xii=mod.xii;
modelStruct.d_modelPar_xii_dX=0.0;
modelStruct.modelPar_given_xii=mod.given("xii");
modelStruct.modelPar_xin=mod.xin;
modelStruct.d_modelPar_xin_dX=0.0;
modelStruct.modelPar_given_xin=mod.given("xin");
modelStruct.modelPar_xisr=mod.xisr;
modelStruct.d_modelPar_xisr_dX=0.0;
modelStruct.modelPar_given_xisr=mod.given("xisr");
modelStruct.modelPar_xikf=mod.xikf;
modelStruct.d_modelPar_xikf_dX=0.0;
modelStruct.modelPar_given_xikf=mod.given("xikf");
modelStruct.modelPar_tavc=mod.tavc;
modelStruct.d_modelPar_tavc_dX=0.0;
modelStruct.modelPar_given_tavc=mod.given("tavc");
modelStruct.modelPar_tavcx=mod.tavcx;
modelStruct.d_modelPar_tavcx_dX=0.0;
modelStruct.modelPar_given_tavcx=mod.given("tavcx");
modelStruct.modelPar_tnf=mod.tnf;
modelStruct.d_modelPar_tnf_dX=0.0;
modelStruct.modelPar_given_tnf=mod.given("tnf");
modelStruct.modelPar_tcvef=mod.tcvef;
modelStruct.d_modelPar_tcvef_dX=0.0;
modelStruct.modelPar_given_tcvef=mod.given("tcvef");
modelStruct.modelPar_tcver=mod.tcver;
modelStruct.d_modelPar_tcver_dX=0.0;
modelStruct.modelPar_given_tcver=mod.given("tcver");
modelStruct.modelPar_tcrth=mod.tcrth;
modelStruct.d_modelPar_tcrth_dX=0.0;
modelStruct.modelPar_given_tcrth=mod.given("tcrth");


// hidden reals


// non-reals (including hiddens)
modelStruct.modelPar_type=mod.type;
modelStruct.modelPar_given_type=mod.given("type");
modelStruct.modelPar_VBICtype=mod.VBICtype;
modelStruct.modelPar_qbm=mod.qbm;
modelStruct.modelPar_given_qbm=mod.given("qbm");



// Copy out all the instance parameters (doubles) into local struct
// Keep a map so we can set the right one to the independent variable
// We do this solely to avoid a big ugly "if/else" block just to find the
// one parameter we're doing sensitivities on.
unordered_map <std::string,double*,HashNoCase,EqualNoCase> inParamMap;
instanceSensStruct instanceStruct;
// reals
instanceStruct.instancePar_m=in.m;
instanceStruct.d_instancePar_m_dX=0.0;
instanceStruct.instancePar_given_m=in.given("m");
inParamMap["m"] = &(instanceStruct.d_instancePar_m_dX);
instanceStruct.instancePar_trise=in.trise;
instanceStruct.d_instancePar_trise_dX=0.0;
instanceStruct.instancePar_given_trise=in.given("trise");
inParamMap["trise"] = &(instanceStruct.d_instancePar_trise_dX);


// Copy all the real hidden instance params into local struct



// Copy all the non-real instance params into vars of their appropriate type:
instanceStruct.instancePar_sw_noise=in.sw_noise;
instanceStruct.instancePar_given_sw_noise=in.given("sw_noise");
instanceStruct.instancePar_sw_et=in.sw_et;
instanceStruct.instancePar_given_sw_et=in.given("sw_et");


// Set the one parameter whose name was passed in to be the independent
// variable for differentiation purposes.  Since we stored variable pointers, this
// makes sure that that ONE variable gets set right.
// FIXME: make this check the name first, otherwise segfault on invalid name!
*(inParamMap[name])=1.0;

//make local copies of all instance vars
//reals
instanceStruct.instanceVar_is_t=in.is_t;
instanceStruct.d_instanceVar_is_t_dX=0.0;
instanceStruct.instanceVar_isrr_t=in.isrr_t;
instanceStruct.d_instanceVar_isrr_t_dX=0.0;
instanceStruct.instanceVar_ibei_t=in.ibei_t;
instanceStruct.d_instanceVar_ibei_t_dX=0.0;
instanceStruct.instanceVar_ibci_t=in.ibci_t;
instanceStruct.d_instanceVar_ibci_t_dX=0.0;
instanceStruct.instanceVar_isp_t=in.isp_t;
instanceStruct.d_instanceVar_isp_t_dX=0.0;
instanceStruct.instanceVar_iben_t=in.iben_t;
instanceStruct.d_instanceVar_iben_t_dX=0.0;
instanceStruct.instanceVar_ibcn_t=in.ibcn_t;
instanceStruct.d_instanceVar_ibcn_t_dX=0.0;
instanceStruct.instanceVar_ibeip_t=in.ibeip_t;
instanceStruct.d_instanceVar_ibeip_t_dX=0.0;
instanceStruct.instanceVar_ibenp_t=in.ibenp_t;
instanceStruct.d_instanceVar_ibenp_t_dX=0.0;
instanceStruct.instanceVar_ibcip_t=in.ibcip_t;
instanceStruct.d_instanceVar_ibcip_t_dX=0.0;
instanceStruct.instanceVar_ibcnp_t=in.ibcnp_t;
instanceStruct.d_instanceVar_ibcnp_t_dX=0.0;
instanceStruct.instanceVar_tdevC=in.tdevC;
instanceStruct.d_instanceVar_tdevC_dX=0.0;
instanceStruct.instanceVar_tdevK=in.tdevK;
instanceStruct.d_instanceVar_tdevK_dX=0.0;
instanceStruct.instanceVar_rT=in.rT;
instanceStruct.d_instanceVar_rT_dX=0.0;
instanceStruct.instanceVar_Gcx=in.Gcx;
instanceStruct.d_instanceVar_Gcx_dX=0.0;
instanceStruct.instanceVar_Gci=in.Gci;
instanceStruct.d_instanceVar_Gci_dX=0.0;
instanceStruct.instanceVar_Gbx=in.Gbx;
instanceStruct.d_instanceVar_Gbx_dX=0.0;
instanceStruct.instanceVar_Gbi=in.Gbi;
instanceStruct.d_instanceVar_Gbi_dX=0.0;
instanceStruct.instanceVar_Ge=in.Ge;
instanceStruct.d_instanceVar_Ge_dX=0.0;
instanceStruct.instanceVar_Gbp=in.Gbp;
instanceStruct.d_instanceVar_Gbp_dX=0.0;
instanceStruct.instanceVar_Gs=in.Gs;
instanceStruct.d_instanceVar_Gs_dX=0.0;
instanceStruct.instanceVar_maxvIfi=in.maxvIfi;
instanceStruct.d_instanceVar_maxvIfi_dX=0.0;
instanceStruct.instanceVar_maxvIri=in.maxvIri;
instanceStruct.d_instanceVar_maxvIri_dX=0.0;
instanceStruct.instanceVar_maxvIp=in.maxvIp;
instanceStruct.d_instanceVar_maxvIp_dX=0.0;
instanceStruct.instanceVar_maxvIbbe=in.maxvIbbe;
instanceStruct.d_instanceVar_maxvIbbe_dX=0.0;
instanceStruct.instanceVar_maxvIbei=in.maxvIbei;
instanceStruct.d_instanceVar_maxvIbei_dX=0.0;
instanceStruct.instanceVar_maxvIben=in.maxvIben;
instanceStruct.d_instanceVar_maxvIben_dX=0.0;
instanceStruct.instanceVar_maxvIbci=in.maxvIbci;
instanceStruct.d_instanceVar_maxvIbci_dX=0.0;
instanceStruct.instanceVar_maxvIbcn=in.maxvIbcn;
instanceStruct.d_instanceVar_maxvIbcn_dX=0.0;
instanceStruct.instanceVar_maxvIbeip=in.maxvIbeip;
instanceStruct.d_instanceVar_maxvIbeip_dX=0.0;
instanceStruct.instanceVar_maxvIbenp=in.maxvIbenp;
instanceStruct.d_instanceVar_maxvIbenp_dX=0.0;
instanceStruct.instanceVar_maxvIbcip=in.maxvIbcip;
instanceStruct.d_instanceVar_maxvIbcip_dX=0.0;
instanceStruct.instanceVar_maxvIbcnp=in.maxvIbcnp;
instanceStruct.d_instanceVar_maxvIbcnp_dX=0.0;
instanceStruct.instanceVar_vtv=in.vtv;
instanceStruct.d_instanceVar_vtv_dX=0.0;
instanceStruct.instanceVar_Itzf=in.Itzf;
instanceStruct.d_instanceVar_Itzf_dX=0.0;
instanceStruct.instanceVar_qb=in.qb;
instanceStruct.d_instanceVar_qb_dX=0.0;
instanceStruct.instanceVar_Iccp=in.Iccp;
instanceStruct.d_instanceVar_Iccp_dX=0.0;
instanceStruct.instanceVar_qbp=in.qbp;
instanceStruct.d_instanceVar_qbp_dX=0.0;
instanceStruct.instanceVar_Ibe=in.Ibe;
instanceStruct.d_instanceVar_Ibe_dX=0.0;
instanceStruct.instanceVar_Ibex=in.Ibex;
instanceStruct.d_instanceVar_Ibex_dX=0.0;
instanceStruct.instanceVar_Ibep=in.Ibep;
instanceStruct.d_instanceVar_Ibep_dX=0.0;
instanceStruct.instanceVar_Irci=in.Irci;
instanceStruct.d_instanceVar_Irci_dX=0.0;
instanceStruct.instanceVar_Vrci=in.Vrci;
instanceStruct.d_instanceVar_Vrci_dX=0.0;
instanceStruct.instanceVar_mMod=in.mMod;
instanceStruct.d_instanceVar_mMod_dX=0.0;
instanceStruct.instanceVar_tVCrit=in.tVCrit;
instanceStruct.d_instanceVar_tVCrit_dX=0.0;


//non-reals


//make local copies of all model vars
//reals
modelStruct.modelVar_tiniK=mod.tiniK;
modelStruct.d_modelVar_tiniK_dX=0.0;
modelStruct.modelVar_Iikr=mod.Iikr;
modelStruct.d_modelVar_Iikr_dX=0.0;
modelStruct.modelVar_Iikp=mod.Iikp;
modelStruct.d_modelVar_Iikp_dX=0.0;
modelStruct.modelVar_Ihrcf=mod.Ihrcf;
modelStruct.d_modelVar_Ihrcf_dX=0.0;
modelStruct.modelVar_Ivtf=mod.Ivtf;
modelStruct.d_modelVar_Ivtf_dX=0.0;
modelStruct.modelVar_Iitf=mod.Iitf;
modelStruct.d_modelVar_Iitf_dX=0.0;
modelStruct.modelVar_sltf=mod.sltf;
modelStruct.d_modelVar_sltf_dX=0.0;
modelStruct.modelVar_VmaxExp=mod.VmaxExp;
modelStruct.d_modelVar_VmaxExp_dX=0.0;
modelStruct.modelVar_gminMod=mod.gminMod;
modelStruct.d_modelVar_gminMod_dX=0.0;
modelStruct.modelVar_imaxMod=mod.imaxMod;
modelStruct.d_modelVar_imaxMod_dX=0.0;


// non-reals



Linear::Vector * solVectorPtr = in.extData.nextSolVectorPtr;

// extract solution variables
probeVars[in.admsProbeID_V_xf2_GND] = (*solVectorPtr)[in.li_xf2];
probeVars[in.admsProbeID_V_xf1_GND] = (*solVectorPtr)[in.li_xf1];
probeVars[in.admsProbeID_V_s_si] = (*solVectorPtr)[in.li_s]- (*solVectorPtr)[in.li_si];
probeVars[in.admsProbeID_V_bx_si] = (*solVectorPtr)[in.li_bx]- (*solVectorPtr)[in.li_si];
probeVars[in.admsProbeID_V_si_bp] = (*solVectorPtr)[in.li_si]- (*solVectorPtr)[in.li_bp];
probeVars[in.admsProbeID_V_bp_cx] = (*solVectorPtr)[in.li_bp]- (*solVectorPtr)[in.li_cx];
probeVars[in.admsProbeID_V_e_ei] = (*solVectorPtr)[in.li_e]- (*solVectorPtr)[in.li_ei];
probeVars[in.admsProbeID_V_bx_bi] = (*solVectorPtr)[in.li_bx]- (*solVectorPtr)[in.li_bi];
probeVars[in.admsProbeID_V_b_bx] = (*solVectorPtr)[in.li_b]- (*solVectorPtr)[in.li_bx];
probeVars[in.admsProbeID_V_cx_ci] = (*solVectorPtr)[in.li_cx]- (*solVectorPtr)[in.li_ci];
probeVars[in.admsProbeID_V_c_cx] = (*solVectorPtr)[in.li_c]- (*solVectorPtr)[in.li_cx];
probeVars[in.admsProbeID_V_b_c] = (*solVectorPtr)[in.li_b]- (*solVectorPtr)[in.li_c];
probeVars[in.admsProbeID_V_b_e] = (*solVectorPtr)[in.li_b]- (*solVectorPtr)[in.li_e];
probeVars[in.admsProbeID_V_bx_bp] = (*solVectorPtr)[in.li_bx]- (*solVectorPtr)[in.li_bp];
probeVars[in.admsProbeID_V_ci_ei] = (*solVectorPtr)[in.li_ci]- (*solVectorPtr)[in.li_ei];
probeVars[in.admsProbeID_V_bx_cx] = (*solVectorPtr)[in.li_bx]- (*solVectorPtr)[in.li_cx];
probeVars[in.admsProbeID_V_bi_cx] = (*solVectorPtr)[in.li_bi]- (*solVectorPtr)[in.li_cx];
probeVars[in.admsProbeID_V_bi_ci] = (*solVectorPtr)[in.li_bi]- (*solVectorPtr)[in.li_ci];
probeVars[in.admsProbeID_V_bx_ei] = (*solVectorPtr)[in.li_bx]- (*solVectorPtr)[in.li_ei];
probeVars[in.admsProbeID_V_bi_ei] = (*solVectorPtr)[in.li_bi]- (*solVectorPtr)[in.li_ei];
probeVars[in.admsProbeID_Temp_dt_GND] = (*solVectorPtr)[in.li_dt];


    // pre-multiply any "typed" probes (i.e. those limited with "typedpnjlim")

            probeVars[in.admsProbeID_V_bx_bp] *= modelStruct.modelPar_VBICtype;
            probeVars[in.admsProbeID_V_bx_cx] *= modelStruct.modelPar_VBICtype;
            probeVars[in.admsProbeID_V_bi_cx] *= modelStruct.modelPar_VBICtype;
            probeVars[in.admsProbeID_V_bi_ci] *= modelStruct.modelPar_VBICtype;
            probeVars[in.admsProbeID_V_bx_ei] *= modelStruct.modelPar_VBICtype;
            probeVars[in.admsProbeID_V_bi_ei] *= modelStruct.modelPar_VBICtype;


  // Need to use processParams-like function to process the
  // initial_model and initial_instance blocks with the LOCAL copies of
  // instance and model vars, and local copies of instance and model
  // params.
evaluateInitialModel(
modelStruct,
 mod.admsModTemp,in.getDeviceOptions().gmin,in);
evaluateInitialInstance(
instanceStruct,
modelStruct,
in.admsTemperature,in.adms_vt_nom,in.getDeviceOptions().gmin,in);


// Now call  the function that does the heavy lifting.
evaluateModelEquations(
probeVars,
// probe constants
in.admsProbeID_V_xf2_GND,
in.admsProbeID_V_xf1_GND,
in.admsProbeID_V_s_si,
in.admsProbeID_V_bx_si,
in.admsProbeID_V_si_bp,
in.admsProbeID_V_bp_cx,
in.admsProbeID_V_e_ei,
in.admsProbeID_V_bx_bi,
in.admsProbeID_V_b_bx,
in.admsProbeID_V_cx_ci,
in.admsProbeID_V_c_cx,
in.admsProbeID_V_b_c,
in.admsProbeID_V_b_e,
in.admsProbeID_V_bx_bp,
in.admsProbeID_V_ci_ei,
in.admsProbeID_V_bx_cx,
in.admsProbeID_V_bi_cx,
in.admsProbeID_V_bi_ci,
in.admsProbeID_V_bx_ei,
in.admsProbeID_V_bi_ei,
in.admsProbeID_Temp_dt_GND,

// node constants
in.admsNodeID_c,
in.admsNodeID_b,
in.admsNodeID_e,
in.admsNodeID_s,
in.admsNodeID_dt,
in.admsNodeID_cx,
in.admsNodeID_ci,
in.admsNodeID_bx,
in.admsNodeID_bi,
in.admsNodeID_ei,
in.admsNodeID_bp,
in.admsNodeID_si,
in.admsNodeID_xf1,
in.admsNodeID_xf2,
instanceStruct,
modelStruct,
 in.admsTemperature,
 in.adms_vt_nom,
 in.getDeviceOptions().gmin,
 d_staticContributions_dX,
 d_dynamicContributions_dX,
 in);


// We now have the F and Q vector stuff, populate the dependencies:

    dfdp[in.admsNodeID_c] += d_staticContributions_dX[in.admsNodeID_c];
    dqdp[in.admsNodeID_c] += d_dynamicContributions_dX[in.admsNodeID_c];
    Findices[in.admsNodeID_c] = in.li_c;
    Qindices[in.admsNodeID_c] = in.li_c;
    dfdp[in.admsNodeID_b] += d_staticContributions_dX[in.admsNodeID_b];
    dqdp[in.admsNodeID_b] += d_dynamicContributions_dX[in.admsNodeID_b];
    Findices[in.admsNodeID_b] = in.li_b;
    Qindices[in.admsNodeID_b] = in.li_b;
    dfdp[in.admsNodeID_e] += d_staticContributions_dX[in.admsNodeID_e];
    dqdp[in.admsNodeID_e] += d_dynamicContributions_dX[in.admsNodeID_e];
    Findices[in.admsNodeID_e] = in.li_e;
    Qindices[in.admsNodeID_e] = in.li_e;
    dfdp[in.admsNodeID_s] += d_staticContributions_dX[in.admsNodeID_s];
    dqdp[in.admsNodeID_s] += d_dynamicContributions_dX[in.admsNodeID_s];
    Findices[in.admsNodeID_s] = in.li_s;
    Qindices[in.admsNodeID_s] = in.li_s;
    dfdp[in.admsNodeID_dt] += d_staticContributions_dX[in.admsNodeID_dt];
    dqdp[in.admsNodeID_dt] += d_dynamicContributions_dX[in.admsNodeID_dt];
    Findices[in.admsNodeID_dt] = in.li_dt;
    Qindices[in.admsNodeID_dt] = in.li_dt;
    dfdp[in.admsNodeID_cx] += d_staticContributions_dX[in.admsNodeID_cx];
    dqdp[in.admsNodeID_cx] += d_dynamicContributions_dX[in.admsNodeID_cx];
    Findices[in.admsNodeID_cx] = in.li_cx;
    Qindices[in.admsNodeID_cx] = in.li_cx;
    dfdp[in.admsNodeID_ci] += d_staticContributions_dX[in.admsNodeID_ci];
    dqdp[in.admsNodeID_ci] += d_dynamicContributions_dX[in.admsNodeID_ci];
    Findices[in.admsNodeID_ci] = in.li_ci;
    Qindices[in.admsNodeID_ci] = in.li_ci;
    dfdp[in.admsNodeID_bx] += d_staticContributions_dX[in.admsNodeID_bx];
    dqdp[in.admsNodeID_bx] += d_dynamicContributions_dX[in.admsNodeID_bx];
    Findices[in.admsNodeID_bx] = in.li_bx;
    Qindices[in.admsNodeID_bx] = in.li_bx;
    dfdp[in.admsNodeID_bi] += d_staticContributions_dX[in.admsNodeID_bi];
    dqdp[in.admsNodeID_bi] += d_dynamicContributions_dX[in.admsNodeID_bi];
    Findices[in.admsNodeID_bi] = in.li_bi;
    Qindices[in.admsNodeID_bi] = in.li_bi;
    dfdp[in.admsNodeID_ei] += d_staticContributions_dX[in.admsNodeID_ei];
    dqdp[in.admsNodeID_ei] += d_dynamicContributions_dX[in.admsNodeID_ei];
    Findices[in.admsNodeID_ei] = in.li_ei;
    Qindices[in.admsNodeID_ei] = in.li_ei;
    dfdp[in.admsNodeID_bp] += d_staticContributions_dX[in.admsNodeID_bp];
    dqdp[in.admsNodeID_bp] += d_dynamicContributions_dX[in.admsNodeID_bp];
    Findices[in.admsNodeID_bp] = in.li_bp;
    Qindices[in.admsNodeID_bp] = in.li_bp;
    dfdp[in.admsNodeID_si] += d_staticContributions_dX[in.admsNodeID_si];
    dqdp[in.admsNodeID_si] += d_dynamicContributions_dX[in.admsNodeID_si];
    Findices[in.admsNodeID_si] = in.li_si;
    Qindices[in.admsNodeID_si] = in.li_si;
    dfdp[in.admsNodeID_xf1] += d_staticContributions_dX[in.admsNodeID_xf1];
    dqdp[in.admsNodeID_xf1] += d_dynamicContributions_dX[in.admsNodeID_xf1];
    Findices[in.admsNodeID_xf1] = in.li_xf1;
    Qindices[in.admsNodeID_xf1] = in.li_xf1;
    dfdp[in.admsNodeID_xf2] += d_staticContributions_dX[in.admsNodeID_xf2];
    dqdp[in.admsNodeID_xf2] += d_dynamicContributions_dX[in.admsNodeID_xf2];
    Findices[in.admsNodeID_xf2] = in.li_xf2;
    Qindices[in.admsNodeID_xf2] = in.li_xf2;


}

//-----------------------------------------------------------------------------
// Function      : ModelSensitivity::operator()
// Purpose       : return sensitivity for a single model parameter
// Special Notes :
// Scope         : public
// Creator       : admsXml
// Creation Date :
//-----------------------------------------------------------------------------
/// Compute sensitivity to a specified model
/// parameter of all device instances of that model's outputs
///
///
/// @param[in] entity  The device entity that owns the parameter
/// @param[in] name    The unadorned parameter name specific to the entity
/// @param[out] dfdp   The derivative of the F vector with respect to the parameter
/// @param[out] dqdp   The derivative of the Q vector with respect to the parameter
/// @param[out] dbdp   The derivative of the B vector with respect to the parameter
/// @param[out] Findices   The indices into the F vector corresponding to the elements of dfdp
/// @param[out] Qindices   The indices into the Q vector corresponding to the elements of dfdp
/// @param[out] Bindices   The indices into the B vector corresponding to the elements of dfdp
///
///
void ModelSensitivity::operator()
(
const ParameterBase &entity,
const std::string &name,
std::vector<double> & dfdp,
std::vector<double> & dqdp,
std::vector<double> & dbdp,
std::vector<int> & Findices,
std::vector<int> & Qindices,
std::vector<int> & Bindices
) const
{
const ParameterBase * e1 = &entity;
const Model & mod = *(dynamic_cast<const Model *> (e1));
int sizeInstance = mod.instanceContainer.size();

dfdp.resize((14+0)*sizeInstance);
dqdp.resize((14+0)*sizeInstance);
Findices.resize((14+0)*sizeInstance);
Qindices.resize((14+0)*sizeInstance);

std::vector <double> probeVars(21);
std::vector <double> d_staticContributions_dX(14+0);
std::vector <double> d_dynamicContributions_dX(14+0);


// Copy out all the model parameters (doubles) into local structure
modelSensStruct modelStruct;

// Keep a map so we can set the right one to the independent variable
// We do this solely to avoid a big ugly "if/else" block just to find the
// one parameter we're doing sensitivities on.
unordered_map <std::string,double*,HashNoCase,EqualNoCase> modParamMap;

// reals
modelStruct.modelPar_npn=mod.npn;
modelStruct.d_modelPar_npn_dX=0.0;
modelStruct.modelPar_given_npn=mod.given("npn");
modParamMap["npn"] = &(modelStruct.d_modelPar_npn_dX);
modelStruct.modelPar_pnp=mod.pnp;
modelStruct.d_modelPar_pnp_dX=0.0;
modelStruct.modelPar_given_pnp=mod.given("pnp");
modParamMap["pnp"] = &(modelStruct.d_modelPar_pnp_dX);
modelStruct.modelPar_scale=mod.scale;
modelStruct.d_modelPar_scale_dX=0.0;
modelStruct.modelPar_given_scale=mod.given("scale");
modParamMap["scale"] = &(modelStruct.d_modelPar_scale_dX);
modelStruct.modelPar_shrink=mod.shrink;
modelStruct.d_modelPar_shrink_dX=0.0;
modelStruct.modelPar_given_shrink=mod.given("shrink");
modParamMap["shrink"] = &(modelStruct.d_modelPar_shrink_dX);
modelStruct.modelPar_tmin=mod.tmin;
modelStruct.d_modelPar_tmin_dX=0.0;
modelStruct.modelPar_given_tmin=mod.given("tmin");
modParamMap["tmin"] = &(modelStruct.d_modelPar_tmin_dX);
modelStruct.modelPar_tmax=mod.tmax;
modelStruct.d_modelPar_tmax_dX=0.0;
modelStruct.modelPar_given_tmax=mod.given("tmax");
modParamMap["tmax"] = &(modelStruct.d_modelPar_tmax_dX);
modelStruct.modelPar_gmin=mod.gmin;
modelStruct.d_modelPar_gmin_dX=0.0;
modelStruct.modelPar_given_gmin=mod.given("gmin");
modParamMap["gmin"] = &(modelStruct.d_modelPar_gmin_dX);
modelStruct.modelPar_pnjmaxi=mod.pnjmaxi;
modelStruct.d_modelPar_pnjmaxi_dX=0.0;
modelStruct.modelPar_given_pnjmaxi=mod.given("pnjmaxi");
modParamMap["pnjmaxi"] = &(modelStruct.d_modelPar_pnjmaxi_dX);
modelStruct.modelPar_maxexp=mod.maxexp;
modelStruct.d_modelPar_maxexp_dX=0.0;
modelStruct.modelPar_given_maxexp=mod.given("maxexp");
modParamMap["maxexp"] = &(modelStruct.d_modelPar_maxexp_dX);
modelStruct.modelPar_tnom=mod.tnom;
modelStruct.d_modelPar_tnom_dX=0.0;
modelStruct.modelPar_given_tnom=mod.given("tnom");
modParamMap["tnom"] = &(modelStruct.d_modelPar_tnom_dX);
modelStruct.modelPar_tminclip=mod.tminclip;
modelStruct.d_modelPar_tminclip_dX=0.0;
modelStruct.modelPar_given_tminclip=mod.given("tminclip");
modParamMap["tminclip"] = &(modelStruct.d_modelPar_tminclip_dX);
modelStruct.modelPar_tmaxclip=mod.tmaxclip;
modelStruct.d_modelPar_tmaxclip_dX=0.0;
modelStruct.modelPar_given_tmaxclip=mod.given("tmaxclip");
modParamMap["tmaxclip"] = &(modelStruct.d_modelPar_tmaxclip_dX);
modelStruct.modelPar_rcx=mod.rcx;
modelStruct.d_modelPar_rcx_dX=0.0;
modelStruct.modelPar_given_rcx=mod.given("rcx");
modParamMap["rcx"] = &(modelStruct.d_modelPar_rcx_dX);
modelStruct.modelPar_rci=mod.rci;
modelStruct.d_modelPar_rci_dX=0.0;
modelStruct.modelPar_given_rci=mod.given("rci");
modParamMap["rci"] = &(modelStruct.d_modelPar_rci_dX);
modelStruct.modelPar_vo=mod.vo;
modelStruct.d_modelPar_vo_dX=0.0;
modelStruct.modelPar_given_vo=mod.given("vo");
modParamMap["vo"] = &(modelStruct.d_modelPar_vo_dX);
modelStruct.modelPar_gamm=mod.gamm;
modelStruct.d_modelPar_gamm_dX=0.0;
modelStruct.modelPar_given_gamm=mod.given("gamm");
modParamMap["gamm"] = &(modelStruct.d_modelPar_gamm_dX);
modelStruct.modelPar_hrcf=mod.hrcf;
modelStruct.d_modelPar_hrcf_dX=0.0;
modelStruct.modelPar_given_hrcf=mod.given("hrcf");
modParamMap["hrcf"] = &(modelStruct.d_modelPar_hrcf_dX);
modelStruct.modelPar_rbx=mod.rbx;
modelStruct.d_modelPar_rbx_dX=0.0;
modelStruct.modelPar_given_rbx=mod.given("rbx");
modParamMap["rbx"] = &(modelStruct.d_modelPar_rbx_dX);
modelStruct.modelPar_rbi=mod.rbi;
modelStruct.d_modelPar_rbi_dX=0.0;
modelStruct.modelPar_given_rbi=mod.given("rbi");
modParamMap["rbi"] = &(modelStruct.d_modelPar_rbi_dX);
modelStruct.modelPar_re=mod.re;
modelStruct.d_modelPar_re_dX=0.0;
modelStruct.modelPar_given_re=mod.given("re");
modParamMap["re"] = &(modelStruct.d_modelPar_re_dX);
modelStruct.modelPar_rs=mod.rs;
modelStruct.d_modelPar_rs_dX=0.0;
modelStruct.modelPar_given_rs=mod.given("rs");
modParamMap["rs"] = &(modelStruct.d_modelPar_rs_dX);
modelStruct.modelPar_rbp=mod.rbp;
modelStruct.d_modelPar_rbp_dX=0.0;
modelStruct.modelPar_given_rbp=mod.given("rbp");
modParamMap["rbp"] = &(modelStruct.d_modelPar_rbp_dX);
modelStruct.modelPar_is=mod.is;
modelStruct.d_modelPar_is_dX=0.0;
modelStruct.modelPar_given_is=mod.given("is");
modParamMap["is"] = &(modelStruct.d_modelPar_is_dX);
modelStruct.modelPar_isrr=mod.isrr;
modelStruct.d_modelPar_isrr_dX=0.0;
modelStruct.modelPar_given_isrr=mod.given("isrr");
modParamMap["isrr"] = &(modelStruct.d_modelPar_isrr_dX);
modelStruct.modelPar_nf=mod.nf;
modelStruct.d_modelPar_nf_dX=0.0;
modelStruct.modelPar_given_nf=mod.given("nf");
modParamMap["nf"] = &(modelStruct.d_modelPar_nf_dX);
modelStruct.modelPar_nr=mod.nr;
modelStruct.d_modelPar_nr_dX=0.0;
modelStruct.modelPar_given_nr=mod.given("nr");
modParamMap["nr"] = &(modelStruct.d_modelPar_nr_dX);
modelStruct.modelPar_isp=mod.isp;
modelStruct.d_modelPar_isp_dX=0.0;
modelStruct.modelPar_given_isp=mod.given("isp");
modParamMap["isp"] = &(modelStruct.d_modelPar_isp_dX);
modelStruct.modelPar_wsp=mod.wsp;
modelStruct.d_modelPar_wsp_dX=0.0;
modelStruct.modelPar_given_wsp=mod.given("wsp");
modParamMap["wsp"] = &(modelStruct.d_modelPar_wsp_dX);
modelStruct.modelPar_nfp=mod.nfp;
modelStruct.d_modelPar_nfp_dX=0.0;
modelStruct.modelPar_given_nfp=mod.given("nfp");
modParamMap["nfp"] = &(modelStruct.d_modelPar_nfp_dX);
modelStruct.modelPar_fc=mod.fc;
modelStruct.d_modelPar_fc_dX=0.0;
modelStruct.modelPar_given_fc=mod.given("fc");
modParamMap["fc"] = &(modelStruct.d_modelPar_fc_dX);
modelStruct.modelPar_cbeo=mod.cbeo;
modelStruct.d_modelPar_cbeo_dX=0.0;
modelStruct.modelPar_given_cbeo=mod.given("cbeo");
modParamMap["cbeo"] = &(modelStruct.d_modelPar_cbeo_dX);
modelStruct.modelPar_cje=mod.cje;
modelStruct.d_modelPar_cje_dX=0.0;
modelStruct.modelPar_given_cje=mod.given("cje");
modParamMap["cje"] = &(modelStruct.d_modelPar_cje_dX);
modelStruct.modelPar_pe=mod.pe;
modelStruct.d_modelPar_pe_dX=0.0;
modelStruct.modelPar_given_pe=mod.given("pe");
modParamMap["pe"] = &(modelStruct.d_modelPar_pe_dX);
modelStruct.modelPar_me=mod.me;
modelStruct.d_modelPar_me_dX=0.0;
modelStruct.modelPar_given_me=mod.given("me");
modParamMap["me"] = &(modelStruct.d_modelPar_me_dX);
modelStruct.modelPar_aje=mod.aje;
modelStruct.d_modelPar_aje_dX=0.0;
modelStruct.modelPar_given_aje=mod.given("aje");
modParamMap["aje"] = &(modelStruct.d_modelPar_aje_dX);
modelStruct.modelPar_cbco=mod.cbco;
modelStruct.d_modelPar_cbco_dX=0.0;
modelStruct.modelPar_given_cbco=mod.given("cbco");
modParamMap["cbco"] = &(modelStruct.d_modelPar_cbco_dX);
modelStruct.modelPar_cjc=mod.cjc;
modelStruct.d_modelPar_cjc_dX=0.0;
modelStruct.modelPar_given_cjc=mod.given("cjc");
modParamMap["cjc"] = &(modelStruct.d_modelPar_cjc_dX);
modelStruct.modelPar_pc=mod.pc;
modelStruct.d_modelPar_pc_dX=0.0;
modelStruct.modelPar_given_pc=mod.given("pc");
modParamMap["pc"] = &(modelStruct.d_modelPar_pc_dX);
modelStruct.modelPar_mc=mod.mc;
modelStruct.d_modelPar_mc_dX=0.0;
modelStruct.modelPar_given_mc=mod.given("mc");
modParamMap["mc"] = &(modelStruct.d_modelPar_mc_dX);
modelStruct.modelPar_ajc=mod.ajc;
modelStruct.d_modelPar_ajc_dX=0.0;
modelStruct.modelPar_given_ajc=mod.given("ajc");
modParamMap["ajc"] = &(modelStruct.d_modelPar_ajc_dX);
modelStruct.modelPar_vrt=mod.vrt;
modelStruct.d_modelPar_vrt_dX=0.0;
modelStruct.modelPar_given_vrt=mod.given("vrt");
modParamMap["vrt"] = &(modelStruct.d_modelPar_vrt_dX);
modelStruct.modelPar_art=mod.art;
modelStruct.d_modelPar_art_dX=0.0;
modelStruct.modelPar_given_art=mod.given("art");
modParamMap["art"] = &(modelStruct.d_modelPar_art_dX);
modelStruct.modelPar_qco=mod.qco;
modelStruct.d_modelPar_qco_dX=0.0;
modelStruct.modelPar_given_qco=mod.given("qco");
modParamMap["qco"] = &(modelStruct.d_modelPar_qco_dX);
modelStruct.modelPar_cjep=mod.cjep;
modelStruct.d_modelPar_cjep_dX=0.0;
modelStruct.modelPar_given_cjep=mod.given("cjep");
modParamMap["cjep"] = &(modelStruct.d_modelPar_cjep_dX);
modelStruct.modelPar_cjcp=mod.cjcp;
modelStruct.d_modelPar_cjcp_dX=0.0;
modelStruct.modelPar_given_cjcp=mod.given("cjcp");
modParamMap["cjcp"] = &(modelStruct.d_modelPar_cjcp_dX);
modelStruct.modelPar_ps=mod.ps;
modelStruct.d_modelPar_ps_dX=0.0;
modelStruct.modelPar_given_ps=mod.given("ps");
modParamMap["ps"] = &(modelStruct.d_modelPar_ps_dX);
modelStruct.modelPar_ms=mod.ms;
modelStruct.d_modelPar_ms_dX=0.0;
modelStruct.modelPar_given_ms=mod.given("ms");
modParamMap["ms"] = &(modelStruct.d_modelPar_ms_dX);
modelStruct.modelPar_ajs=mod.ajs;
modelStruct.d_modelPar_ajs_dX=0.0;
modelStruct.modelPar_given_ajs=mod.given("ajs");
modParamMap["ajs"] = &(modelStruct.d_modelPar_ajs_dX);
modelStruct.modelPar_ccso=mod.ccso;
modelStruct.d_modelPar_ccso_dX=0.0;
modelStruct.modelPar_given_ccso=mod.given("ccso");
modParamMap["ccso"] = &(modelStruct.d_modelPar_ccso_dX);
modelStruct.modelPar_ibei=mod.ibei;
modelStruct.d_modelPar_ibei_dX=0.0;
modelStruct.modelPar_given_ibei=mod.given("ibei");
modParamMap["ibei"] = &(modelStruct.d_modelPar_ibei_dX);
modelStruct.modelPar_wbe=mod.wbe;
modelStruct.d_modelPar_wbe_dX=0.0;
modelStruct.modelPar_given_wbe=mod.given("wbe");
modParamMap["wbe"] = &(modelStruct.d_modelPar_wbe_dX);
modelStruct.modelPar_nei=mod.nei;
modelStruct.d_modelPar_nei_dX=0.0;
modelStruct.modelPar_given_nei=mod.given("nei");
modParamMap["nei"] = &(modelStruct.d_modelPar_nei_dX);
modelStruct.modelPar_qnibeir=mod.qnibeir;
modelStruct.d_modelPar_qnibeir_dX=0.0;
modelStruct.modelPar_given_qnibeir=mod.given("qnibeir");
modParamMap["qnibeir"] = &(modelStruct.d_modelPar_qnibeir_dX);
modelStruct.modelPar_iben=mod.iben;
modelStruct.d_modelPar_iben_dX=0.0;
modelStruct.modelPar_given_iben=mod.given("iben");
modParamMap["iben"] = &(modelStruct.d_modelPar_iben_dX);
modelStruct.modelPar_nen=mod.nen;
modelStruct.d_modelPar_nen_dX=0.0;
modelStruct.modelPar_given_nen=mod.given("nen");
modParamMap["nen"] = &(modelStruct.d_modelPar_nen_dX);
modelStruct.modelPar_ibci=mod.ibci;
modelStruct.d_modelPar_ibci_dX=0.0;
modelStruct.modelPar_given_ibci=mod.given("ibci");
modParamMap["ibci"] = &(modelStruct.d_modelPar_ibci_dX);
modelStruct.modelPar_nci=mod.nci;
modelStruct.d_modelPar_nci_dX=0.0;
modelStruct.modelPar_given_nci=mod.given("nci");
modParamMap["nci"] = &(modelStruct.d_modelPar_nci_dX);
modelStruct.modelPar_ibcn=mod.ibcn;
modelStruct.d_modelPar_ibcn_dX=0.0;
modelStruct.modelPar_given_ibcn=mod.given("ibcn");
modParamMap["ibcn"] = &(modelStruct.d_modelPar_ibcn_dX);
modelStruct.modelPar_ncn=mod.ncn;
modelStruct.d_modelPar_ncn_dX=0.0;
modelStruct.modelPar_given_ncn=mod.given("ncn");
modParamMap["ncn"] = &(modelStruct.d_modelPar_ncn_dX);
modelStruct.modelPar_ibeip=mod.ibeip;
modelStruct.d_modelPar_ibeip_dX=0.0;
modelStruct.modelPar_given_ibeip=mod.given("ibeip");
modParamMap["ibeip"] = &(modelStruct.d_modelPar_ibeip_dX);
modelStruct.modelPar_ibenp=mod.ibenp;
modelStruct.d_modelPar_ibenp_dX=0.0;
modelStruct.modelPar_given_ibenp=mod.given("ibenp");
modParamMap["ibenp"] = &(modelStruct.d_modelPar_ibenp_dX);
modelStruct.modelPar_ibcip=mod.ibcip;
modelStruct.d_modelPar_ibcip_dX=0.0;
modelStruct.modelPar_given_ibcip=mod.given("ibcip");
modParamMap["ibcip"] = &(modelStruct.d_modelPar_ibcip_dX);
modelStruct.modelPar_ncip=mod.ncip;
modelStruct.d_modelPar_ncip_dX=0.0;
modelStruct.modelPar_given_ncip=mod.given("ncip");
modParamMap["ncip"] = &(modelStruct.d_modelPar_ncip_dX);
modelStruct.modelPar_ibcnp=mod.ibcnp;
modelStruct.d_modelPar_ibcnp_dX=0.0;
modelStruct.modelPar_given_ibcnp=mod.given("ibcnp");
modParamMap["ibcnp"] = &(modelStruct.d_modelPar_ibcnp_dX);
modelStruct.modelPar_ncnp=mod.ncnp;
modelStruct.d_modelPar_ncnp_dX=0.0;
modelStruct.modelPar_given_ncnp=mod.given("ncnp");
modParamMap["ncnp"] = &(modelStruct.d_modelPar_ncnp_dX);
modelStruct.modelPar_vef=mod.vef;
modelStruct.d_modelPar_vef_dX=0.0;
modelStruct.modelPar_given_vef=mod.given("vef");
modParamMap["vef"] = &(modelStruct.d_modelPar_vef_dX);
modelStruct.modelPar_ver=mod.ver;
modelStruct.d_modelPar_ver_dX=0.0;
modelStruct.modelPar_given_ver=mod.given("ver");
modParamMap["ver"] = &(modelStruct.d_modelPar_ver_dX);
modelStruct.modelPar_ikf=mod.ikf;
modelStruct.d_modelPar_ikf_dX=0.0;
modelStruct.modelPar_given_ikf=mod.given("ikf");
modParamMap["ikf"] = &(modelStruct.d_modelPar_ikf_dX);
modelStruct.modelPar_nkf=mod.nkf;
modelStruct.d_modelPar_nkf_dX=0.0;
modelStruct.modelPar_given_nkf=mod.given("nkf");
modParamMap["nkf"] = &(modelStruct.d_modelPar_nkf_dX);
modelStruct.modelPar_ikr=mod.ikr;
modelStruct.d_modelPar_ikr_dX=0.0;
modelStruct.modelPar_given_ikr=mod.given("ikr");
modParamMap["ikr"] = &(modelStruct.d_modelPar_ikr_dX);
modelStruct.modelPar_ikp=mod.ikp;
modelStruct.d_modelPar_ikp_dX=0.0;
modelStruct.modelPar_given_ikp=mod.given("ikp");
modParamMap["ikp"] = &(modelStruct.d_modelPar_ikp_dX);
modelStruct.modelPar_tf=mod.tf;
modelStruct.d_modelPar_tf_dX=0.0;
modelStruct.modelPar_given_tf=mod.given("tf");
modParamMap["tf"] = &(modelStruct.d_modelPar_tf_dX);
modelStruct.modelPar_qtf=mod.qtf;
modelStruct.d_modelPar_qtf_dX=0.0;
modelStruct.modelPar_given_qtf=mod.given("qtf");
modParamMap["qtf"] = &(modelStruct.d_modelPar_qtf_dX);
modelStruct.modelPar_xtf=mod.xtf;
modelStruct.d_modelPar_xtf_dX=0.0;
modelStruct.modelPar_given_xtf=mod.given("xtf");
modParamMap["xtf"] = &(modelStruct.d_modelPar_xtf_dX);
modelStruct.modelPar_vtf=mod.vtf;
modelStruct.d_modelPar_vtf_dX=0.0;
modelStruct.modelPar_given_vtf=mod.given("vtf");
modParamMap["vtf"] = &(modelStruct.d_modelPar_vtf_dX);
modelStruct.modelPar_itf=mod.itf;
modelStruct.d_modelPar_itf_dX=0.0;
modelStruct.modelPar_given_itf=mod.given("itf");
modParamMap["itf"] = &(modelStruct.d_modelPar_itf_dX);
modelStruct.modelPar_tr=mod.tr;
modelStruct.d_modelPar_tr_dX=0.0;
modelStruct.modelPar_given_tr=mod.given("tr");
modParamMap["tr"] = &(modelStruct.d_modelPar_tr_dX);
modelStruct.modelPar_td=mod.td;
modelStruct.d_modelPar_td_dX=0.0;
modelStruct.modelPar_given_td=mod.given("td");
modParamMap["td"] = &(modelStruct.d_modelPar_td_dX);
modelStruct.modelPar_avc1=mod.avc1;
modelStruct.d_modelPar_avc1_dX=0.0;
modelStruct.modelPar_given_avc1=mod.given("avc1");
modParamMap["avc1"] = &(modelStruct.d_modelPar_avc1_dX);
modelStruct.modelPar_avc2=mod.avc2;
modelStruct.d_modelPar_avc2_dX=0.0;
modelStruct.modelPar_given_avc2=mod.given("avc2");
modParamMap["avc2"] = &(modelStruct.d_modelPar_avc2_dX);
modelStruct.modelPar_avcx1=mod.avcx1;
modelStruct.d_modelPar_avcx1_dX=0.0;
modelStruct.modelPar_given_avcx1=mod.given("avcx1");
modParamMap["avcx1"] = &(modelStruct.d_modelPar_avcx1_dX);
modelStruct.modelPar_avcx2=mod.avcx2;
modelStruct.d_modelPar_avcx2_dX=0.0;
modelStruct.modelPar_given_avcx2=mod.given("avcx2");
modParamMap["avcx2"] = &(modelStruct.d_modelPar_avcx2_dX);
modelStruct.modelPar_mcx=mod.mcx;
modelStruct.d_modelPar_mcx_dX=0.0;
modelStruct.modelPar_given_mcx=mod.given("mcx");
modParamMap["mcx"] = &(modelStruct.d_modelPar_mcx_dX);
modelStruct.modelPar_vbbe=mod.vbbe;
modelStruct.d_modelPar_vbbe_dX=0.0;
modelStruct.modelPar_given_vbbe=mod.given("vbbe");
modParamMap["vbbe"] = &(modelStruct.d_modelPar_vbbe_dX);
modelStruct.modelPar_nbbe=mod.nbbe;
modelStruct.d_modelPar_nbbe_dX=0.0;
modelStruct.modelPar_given_nbbe=mod.given("nbbe");
modParamMap["nbbe"] = &(modelStruct.d_modelPar_nbbe_dX);
modelStruct.modelPar_ibbe=mod.ibbe;
modelStruct.d_modelPar_ibbe_dX=0.0;
modelStruct.modelPar_given_ibbe=mod.given("ibbe");
modParamMap["ibbe"] = &(modelStruct.d_modelPar_ibbe_dX);
modelStruct.modelPar_tvbbe1=mod.tvbbe1;
modelStruct.d_modelPar_tvbbe1_dX=0.0;
modelStruct.modelPar_given_tvbbe1=mod.given("tvbbe1");
modParamMap["tvbbe1"] = &(modelStruct.d_modelPar_tvbbe1_dX);
modelStruct.modelPar_tvbbe2=mod.tvbbe2;
modelStruct.d_modelPar_tvbbe2_dX=0.0;
modelStruct.modelPar_given_tvbbe2=mod.given("tvbbe2");
modParamMap["tvbbe2"] = &(modelStruct.d_modelPar_tvbbe2_dX);
modelStruct.modelPar_tnbbe=mod.tnbbe;
modelStruct.d_modelPar_tnbbe_dX=0.0;
modelStruct.modelPar_given_tnbbe=mod.given("tnbbe");
modParamMap["tnbbe"] = &(modelStruct.d_modelPar_tnbbe_dX);
modelStruct.modelPar_vpte=mod.vpte;
modelStruct.d_modelPar_vpte_dX=0.0;
modelStruct.modelPar_given_vpte=mod.given("vpte");
modParamMap["vpte"] = &(modelStruct.d_modelPar_vpte_dX);
modelStruct.modelPar_ibk0=mod.ibk0;
modelStruct.d_modelPar_ibk0_dX=0.0;
modelStruct.modelPar_given_ibk0=mod.given("ibk0");
modParamMap["ibk0"] = &(modelStruct.d_modelPar_ibk0_dX);
modelStruct.modelPar_abk=mod.abk;
modelStruct.d_modelPar_abk_dX=0.0;
modelStruct.modelPar_given_abk=mod.given("abk");
modParamMap["abk"] = &(modelStruct.d_modelPar_abk_dX);
modelStruct.modelPar_bbk=mod.bbk;
modelStruct.d_modelPar_bbk_dX=0.0;
modelStruct.modelPar_given_bbk=mod.given("bbk");
modParamMap["bbk"] = &(modelStruct.d_modelPar_bbk_dX);
modelStruct.modelPar_kfn=mod.kfn;
modelStruct.d_modelPar_kfn_dX=0.0;
modelStruct.modelPar_given_kfn=mod.given("kfn");
modParamMap["kfn"] = &(modelStruct.d_modelPar_kfn_dX);
modelStruct.modelPar_afn=mod.afn;
modelStruct.d_modelPar_afn_dX=0.0;
modelStruct.modelPar_given_afn=mod.given("afn");
modParamMap["afn"] = &(modelStruct.d_modelPar_afn_dX);
modelStruct.modelPar_bfn=mod.bfn;
modelStruct.d_modelPar_bfn_dX=0.0;
modelStruct.modelPar_given_bfn=mod.given("bfn");
modParamMap["bfn"] = &(modelStruct.d_modelPar_bfn_dX);
modelStruct.modelPar_rth=mod.rth;
modelStruct.d_modelPar_rth_dX=0.0;
modelStruct.modelPar_given_rth=mod.given("rth");
modParamMap["rth"] = &(modelStruct.d_modelPar_rth_dX);
modelStruct.modelPar_cth=mod.cth;
modelStruct.d_modelPar_cth_dX=0.0;
modelStruct.modelPar_given_cth=mod.given("cth");
modParamMap["cth"] = &(modelStruct.d_modelPar_cth_dX);
modelStruct.modelPar_xre=mod.xre;
modelStruct.d_modelPar_xre_dX=0.0;
modelStruct.modelPar_given_xre=mod.given("xre");
modParamMap["xre"] = &(modelStruct.d_modelPar_xre_dX);
modelStruct.modelPar_xrb=mod.xrb;
modelStruct.d_modelPar_xrb_dX=0.0;
modelStruct.modelPar_given_xrb=mod.given("xrb");
modParamMap["xrb"] = &(modelStruct.d_modelPar_xrb_dX);
modelStruct.modelPar_xrbi=mod.xrbi;
modelStruct.d_modelPar_xrbi_dX=0.0;
modelStruct.modelPar_given_xrbi=mod.given("xrbi");
modParamMap["xrbi"] = &(modelStruct.d_modelPar_xrbi_dX);
modelStruct.modelPar_xrbx=mod.xrbx;
modelStruct.d_modelPar_xrbx_dX=0.0;
modelStruct.modelPar_given_xrbx=mod.given("xrbx");
modParamMap["xrbx"] = &(modelStruct.d_modelPar_xrbx_dX);
modelStruct.modelPar_xrc=mod.xrc;
modelStruct.d_modelPar_xrc_dX=0.0;
modelStruct.modelPar_given_xrc=mod.given("xrc");
modParamMap["xrc"] = &(modelStruct.d_modelPar_xrc_dX);
modelStruct.modelPar_xrci=mod.xrci;
modelStruct.d_modelPar_xrci_dX=0.0;
modelStruct.modelPar_given_xrci=mod.given("xrci");
modParamMap["xrci"] = &(modelStruct.d_modelPar_xrci_dX);
modelStruct.modelPar_xrcx=mod.xrcx;
modelStruct.d_modelPar_xrcx_dX=0.0;
modelStruct.modelPar_given_xrcx=mod.given("xrcx");
modParamMap["xrcx"] = &(modelStruct.d_modelPar_xrcx_dX);
modelStruct.modelPar_xrbp=mod.xrbp;
modelStruct.d_modelPar_xrbp_dX=0.0;
modelStruct.modelPar_given_xrbp=mod.given("xrbp");
modParamMap["xrbp"] = &(modelStruct.d_modelPar_xrbp_dX);
modelStruct.modelPar_xrs=mod.xrs;
modelStruct.d_modelPar_xrs_dX=0.0;
modelStruct.modelPar_given_xrs=mod.given("xrs");
modParamMap["xrs"] = &(modelStruct.d_modelPar_xrs_dX);
modelStruct.modelPar_xvo=mod.xvo;
modelStruct.d_modelPar_xvo_dX=0.0;
modelStruct.modelPar_given_xvo=mod.given("xvo");
modParamMap["xvo"] = &(modelStruct.d_modelPar_xvo_dX);
modelStruct.modelPar_ea=mod.ea;
modelStruct.d_modelPar_ea_dX=0.0;
modelStruct.modelPar_given_ea=mod.given("ea");
modParamMap["ea"] = &(modelStruct.d_modelPar_ea_dX);
modelStruct.modelPar_eaie=mod.eaie;
modelStruct.d_modelPar_eaie_dX=0.0;
modelStruct.modelPar_given_eaie=mod.given("eaie");
modParamMap["eaie"] = &(modelStruct.d_modelPar_eaie_dX);
modelStruct.modelPar_eaic=mod.eaic;
modelStruct.d_modelPar_eaic_dX=0.0;
modelStruct.modelPar_given_eaic=mod.given("eaic");
modParamMap["eaic"] = &(modelStruct.d_modelPar_eaic_dX);
modelStruct.modelPar_eais=mod.eais;
modelStruct.d_modelPar_eais_dX=0.0;
modelStruct.modelPar_given_eais=mod.given("eais");
modParamMap["eais"] = &(modelStruct.d_modelPar_eais_dX);
modelStruct.modelPar_eane=mod.eane;
modelStruct.d_modelPar_eane_dX=0.0;
modelStruct.modelPar_given_eane=mod.given("eane");
modParamMap["eane"] = &(modelStruct.d_modelPar_eane_dX);
modelStruct.modelPar_eanc=mod.eanc;
modelStruct.d_modelPar_eanc_dX=0.0;
modelStruct.modelPar_given_eanc=mod.given("eanc");
modParamMap["eanc"] = &(modelStruct.d_modelPar_eanc_dX);
modelStruct.modelPar_eans=mod.eans;
modelStruct.d_modelPar_eans_dX=0.0;
modelStruct.modelPar_given_eans=mod.given("eans");
modParamMap["eans"] = &(modelStruct.d_modelPar_eans_dX);
modelStruct.modelPar_eap=mod.eap;
modelStruct.d_modelPar_eap_dX=0.0;
modelStruct.modelPar_given_eap=mod.given("eap");
modParamMap["eap"] = &(modelStruct.d_modelPar_eap_dX);
modelStruct.modelPar_dear=mod.dear;
modelStruct.d_modelPar_dear_dX=0.0;
modelStruct.modelPar_given_dear=mod.given("dear");
modParamMap["dear"] = &(modelStruct.d_modelPar_dear_dX);
modelStruct.modelPar_xis=mod.xis;
modelStruct.d_modelPar_xis_dX=0.0;
modelStruct.modelPar_given_xis=mod.given("xis");
modParamMap["xis"] = &(modelStruct.d_modelPar_xis_dX);
modelStruct.modelPar_xii=mod.xii;
modelStruct.d_modelPar_xii_dX=0.0;
modelStruct.modelPar_given_xii=mod.given("xii");
modParamMap["xii"] = &(modelStruct.d_modelPar_xii_dX);
modelStruct.modelPar_xin=mod.xin;
modelStruct.d_modelPar_xin_dX=0.0;
modelStruct.modelPar_given_xin=mod.given("xin");
modParamMap["xin"] = &(modelStruct.d_modelPar_xin_dX);
modelStruct.modelPar_xisr=mod.xisr;
modelStruct.d_modelPar_xisr_dX=0.0;
modelStruct.modelPar_given_xisr=mod.given("xisr");
modParamMap["xisr"] = &(modelStruct.d_modelPar_xisr_dX);
modelStruct.modelPar_xikf=mod.xikf;
modelStruct.d_modelPar_xikf_dX=0.0;
modelStruct.modelPar_given_xikf=mod.given("xikf");
modParamMap["xikf"] = &(modelStruct.d_modelPar_xikf_dX);
modelStruct.modelPar_tavc=mod.tavc;
modelStruct.d_modelPar_tavc_dX=0.0;
modelStruct.modelPar_given_tavc=mod.given("tavc");
modParamMap["tavc"] = &(modelStruct.d_modelPar_tavc_dX);
modelStruct.modelPar_tavcx=mod.tavcx;
modelStruct.d_modelPar_tavcx_dX=0.0;
modelStruct.modelPar_given_tavcx=mod.given("tavcx");
modParamMap["tavcx"] = &(modelStruct.d_modelPar_tavcx_dX);
modelStruct.modelPar_tnf=mod.tnf;
modelStruct.d_modelPar_tnf_dX=0.0;
modelStruct.modelPar_given_tnf=mod.given("tnf");
modParamMap["tnf"] = &(modelStruct.d_modelPar_tnf_dX);
modelStruct.modelPar_tcvef=mod.tcvef;
modelStruct.d_modelPar_tcvef_dX=0.0;
modelStruct.modelPar_given_tcvef=mod.given("tcvef");
modParamMap["tcvef"] = &(modelStruct.d_modelPar_tcvef_dX);
modelStruct.modelPar_tcver=mod.tcver;
modelStruct.d_modelPar_tcver_dX=0.0;
modelStruct.modelPar_given_tcver=mod.given("tcver");
modParamMap["tcver"] = &(modelStruct.d_modelPar_tcver_dX);
modelStruct.modelPar_tcrth=mod.tcrth;
modelStruct.d_modelPar_tcrth_dX=0.0;
modelStruct.modelPar_given_tcrth=mod.given("tcrth");
modParamMap["tcrth"] = &(modelStruct.d_modelPar_tcrth_dX);


// hidden reals


// non-reals (including hiddens)
modelStruct.modelPar_type=mod.type;
modelStruct.modelPar_given_type=mod.given("type");
modelStruct.modelPar_VBICtype=mod.VBICtype;
modelStruct.modelPar_qbm=mod.qbm;
modelStruct.modelPar_given_qbm=mod.given("qbm");


// Set the one parameter whose name was passed in to be the independent
// variable for differentiation purposes.  Since we stored variable pointers, this
// makes sure that that ONE variable gets set right.
// FIXME: make this check name for presence first!  Segfault on invalid.
*(modParamMap[name])=1.0;

//make local copies of all model vars
//reals
modelStruct.modelVar_tiniK=mod.tiniK;
modelStruct.d_modelVar_tiniK_dX=0.0;
modelStruct.modelVar_Iikr=mod.Iikr;
modelStruct.d_modelVar_Iikr_dX=0.0;
modelStruct.modelVar_Iikp=mod.Iikp;
modelStruct.d_modelVar_Iikp_dX=0.0;
modelStruct.modelVar_Ihrcf=mod.Ihrcf;
modelStruct.d_modelVar_Ihrcf_dX=0.0;
modelStruct.modelVar_Ivtf=mod.Ivtf;
modelStruct.d_modelVar_Ivtf_dX=0.0;
modelStruct.modelVar_Iitf=mod.Iitf;
modelStruct.d_modelVar_Iitf_dX=0.0;
modelStruct.modelVar_sltf=mod.sltf;
modelStruct.d_modelVar_sltf_dX=0.0;
modelStruct.modelVar_VmaxExp=mod.VmaxExp;
modelStruct.d_modelVar_VmaxExp_dX=0.0;
modelStruct.modelVar_gminMod=mod.gminMod;
modelStruct.d_modelVar_gminMod_dX=0.0;
modelStruct.modelVar_imaxMod=mod.imaxMod;
modelStruct.d_modelVar_imaxMod_dX=0.0;


// non-reals



// Now loop over all instances and do the deed
int inst=0;
for (std::vector<Instance*>::const_iterator in_it=mod.instanceContainer.begin(); in_it != mod.instanceContainer.end(); ++in_it,++inst)
{

  Instance & in=*(*in_it);
  // initialize contributions to zero (automatically sets derivatives to zero)
  for (int i=0; i < 14+0 ; ++i)
  {
  d_staticContributions_dX[i]=0;
  d_dynamicContributions_dX[i]=0;
  }



  // Copy out all the instance parameters (doubles) into local struct
 instanceSensStruct instanceStruct;

 // reals
instanceStruct.instancePar_m=in.m;
instanceStruct.d_instancePar_m_dX=0.0;
instanceStruct.instancePar_given_m=in.given("m");
instanceStruct.instancePar_trise=in.trise;
instanceStruct.d_instancePar_trise_dX=0.0;
instanceStruct.instancePar_given_trise=in.given("trise");


  // real hidden instance


  // Copy all the non-real instance params into vars of their appropriate type:
instanceStruct.instancePar_sw_noise=in.sw_noise;
instanceStruct.instancePar_given_sw_noise=in.given("sw_noise");
instanceStruct.instancePar_sw_et=in.sw_et;
instanceStruct.instancePar_given_sw_et=in.given("sw_et");




  // If there are any instance parameters that were not given, and have
  // corresponding model params, copy the model param into the instance.
  // This was already done by the instance constructor, but we do it again
  // because now we're propagating derivatives, and the user could be trying
  // to get sensitivity to the model parameter.


  //make local copies of all instance vars
  //reals
instanceStruct.instanceVar_is_t=in.is_t;
instanceStruct.d_instanceVar_is_t_dX=0.0;
instanceStruct.instanceVar_isrr_t=in.isrr_t;
instanceStruct.d_instanceVar_isrr_t_dX=0.0;
instanceStruct.instanceVar_ibei_t=in.ibei_t;
instanceStruct.d_instanceVar_ibei_t_dX=0.0;
instanceStruct.instanceVar_ibci_t=in.ibci_t;
instanceStruct.d_instanceVar_ibci_t_dX=0.0;
instanceStruct.instanceVar_isp_t=in.isp_t;
instanceStruct.d_instanceVar_isp_t_dX=0.0;
instanceStruct.instanceVar_iben_t=in.iben_t;
instanceStruct.d_instanceVar_iben_t_dX=0.0;
instanceStruct.instanceVar_ibcn_t=in.ibcn_t;
instanceStruct.d_instanceVar_ibcn_t_dX=0.0;
instanceStruct.instanceVar_ibeip_t=in.ibeip_t;
instanceStruct.d_instanceVar_ibeip_t_dX=0.0;
instanceStruct.instanceVar_ibenp_t=in.ibenp_t;
instanceStruct.d_instanceVar_ibenp_t_dX=0.0;
instanceStruct.instanceVar_ibcip_t=in.ibcip_t;
instanceStruct.d_instanceVar_ibcip_t_dX=0.0;
instanceStruct.instanceVar_ibcnp_t=in.ibcnp_t;
instanceStruct.d_instanceVar_ibcnp_t_dX=0.0;
instanceStruct.instanceVar_tdevC=in.tdevC;
instanceStruct.d_instanceVar_tdevC_dX=0.0;
instanceStruct.instanceVar_tdevK=in.tdevK;
instanceStruct.d_instanceVar_tdevK_dX=0.0;
instanceStruct.instanceVar_rT=in.rT;
instanceStruct.d_instanceVar_rT_dX=0.0;
instanceStruct.instanceVar_Gcx=in.Gcx;
instanceStruct.d_instanceVar_Gcx_dX=0.0;
instanceStruct.instanceVar_Gci=in.Gci;
instanceStruct.d_instanceVar_Gci_dX=0.0;
instanceStruct.instanceVar_Gbx=in.Gbx;
instanceStruct.d_instanceVar_Gbx_dX=0.0;
instanceStruct.instanceVar_Gbi=in.Gbi;
instanceStruct.d_instanceVar_Gbi_dX=0.0;
instanceStruct.instanceVar_Ge=in.Ge;
instanceStruct.d_instanceVar_Ge_dX=0.0;
instanceStruct.instanceVar_Gbp=in.Gbp;
instanceStruct.d_instanceVar_Gbp_dX=0.0;
instanceStruct.instanceVar_Gs=in.Gs;
instanceStruct.d_instanceVar_Gs_dX=0.0;
instanceStruct.instanceVar_maxvIfi=in.maxvIfi;
instanceStruct.d_instanceVar_maxvIfi_dX=0.0;
instanceStruct.instanceVar_maxvIri=in.maxvIri;
instanceStruct.d_instanceVar_maxvIri_dX=0.0;
instanceStruct.instanceVar_maxvIp=in.maxvIp;
instanceStruct.d_instanceVar_maxvIp_dX=0.0;
instanceStruct.instanceVar_maxvIbbe=in.maxvIbbe;
instanceStruct.d_instanceVar_maxvIbbe_dX=0.0;
instanceStruct.instanceVar_maxvIbei=in.maxvIbei;
instanceStruct.d_instanceVar_maxvIbei_dX=0.0;
instanceStruct.instanceVar_maxvIben=in.maxvIben;
instanceStruct.d_instanceVar_maxvIben_dX=0.0;
instanceStruct.instanceVar_maxvIbci=in.maxvIbci;
instanceStruct.d_instanceVar_maxvIbci_dX=0.0;
instanceStruct.instanceVar_maxvIbcn=in.maxvIbcn;
instanceStruct.d_instanceVar_maxvIbcn_dX=0.0;
instanceStruct.instanceVar_maxvIbeip=in.maxvIbeip;
instanceStruct.d_instanceVar_maxvIbeip_dX=0.0;
instanceStruct.instanceVar_maxvIbenp=in.maxvIbenp;
instanceStruct.d_instanceVar_maxvIbenp_dX=0.0;
instanceStruct.instanceVar_maxvIbcip=in.maxvIbcip;
instanceStruct.d_instanceVar_maxvIbcip_dX=0.0;
instanceStruct.instanceVar_maxvIbcnp=in.maxvIbcnp;
instanceStruct.d_instanceVar_maxvIbcnp_dX=0.0;
instanceStruct.instanceVar_vtv=in.vtv;
instanceStruct.d_instanceVar_vtv_dX=0.0;
instanceStruct.instanceVar_Itzf=in.Itzf;
instanceStruct.d_instanceVar_Itzf_dX=0.0;
instanceStruct.instanceVar_qb=in.qb;
instanceStruct.d_instanceVar_qb_dX=0.0;
instanceStruct.instanceVar_Iccp=in.Iccp;
instanceStruct.d_instanceVar_Iccp_dX=0.0;
instanceStruct.instanceVar_qbp=in.qbp;
instanceStruct.d_instanceVar_qbp_dX=0.0;
instanceStruct.instanceVar_Ibe=in.Ibe;
instanceStruct.d_instanceVar_Ibe_dX=0.0;
instanceStruct.instanceVar_Ibex=in.Ibex;
instanceStruct.d_instanceVar_Ibex_dX=0.0;
instanceStruct.instanceVar_Ibep=in.Ibep;
instanceStruct.d_instanceVar_Ibep_dX=0.0;
instanceStruct.instanceVar_Irci=in.Irci;
instanceStruct.d_instanceVar_Irci_dX=0.0;
instanceStruct.instanceVar_Vrci=in.Vrci;
instanceStruct.d_instanceVar_Vrci_dX=0.0;
instanceStruct.instanceVar_mMod=in.mMod;
instanceStruct.d_instanceVar_mMod_dX=0.0;
instanceStruct.instanceVar_tVCrit=in.tVCrit;
instanceStruct.d_instanceVar_tVCrit_dX=0.0;


  //non-reals



  Linear::Vector * solVectorPtr = in.extData.nextSolVectorPtr;

  // extract solution variables
probeVars[in.admsProbeID_V_xf2_GND] = (*solVectorPtr)[in.li_xf2];
probeVars[in.admsProbeID_V_xf1_GND] = (*solVectorPtr)[in.li_xf1];
probeVars[in.admsProbeID_V_s_si] = (*solVectorPtr)[in.li_s] - (*solVectorPtr)[in.li_si];
probeVars[in.admsProbeID_V_bx_si] = (*solVectorPtr)[in.li_bx] - (*solVectorPtr)[in.li_si];
probeVars[in.admsProbeID_V_si_bp] = (*solVectorPtr)[in.li_si] - (*solVectorPtr)[in.li_bp];
probeVars[in.admsProbeID_V_bp_cx] = (*solVectorPtr)[in.li_bp] - (*solVectorPtr)[in.li_cx];
probeVars[in.admsProbeID_V_e_ei] = (*solVectorPtr)[in.li_e] - (*solVectorPtr)[in.li_ei];
probeVars[in.admsProbeID_V_bx_bi] = (*solVectorPtr)[in.li_bx] - (*solVectorPtr)[in.li_bi];
probeVars[in.admsProbeID_V_b_bx] = (*solVectorPtr)[in.li_b] - (*solVectorPtr)[in.li_bx];
probeVars[in.admsProbeID_V_cx_ci] = (*solVectorPtr)[in.li_cx] - (*solVectorPtr)[in.li_ci];
probeVars[in.admsProbeID_V_c_cx] = (*solVectorPtr)[in.li_c] - (*solVectorPtr)[in.li_cx];
probeVars[in.admsProbeID_V_b_c] = (*solVectorPtr)[in.li_b] - (*solVectorPtr)[in.li_c];
probeVars[in.admsProbeID_V_b_e] = (*solVectorPtr)[in.li_b] - (*solVectorPtr)[in.li_e];
probeVars[in.admsProbeID_V_bx_bp] = (*solVectorPtr)[in.li_bx] - (*solVectorPtr)[in.li_bp];
probeVars[in.admsProbeID_V_ci_ei] = (*solVectorPtr)[in.li_ci] - (*solVectorPtr)[in.li_ei];
probeVars[in.admsProbeID_V_bx_cx] = (*solVectorPtr)[in.li_bx] - (*solVectorPtr)[in.li_cx];
probeVars[in.admsProbeID_V_bi_cx] = (*solVectorPtr)[in.li_bi] - (*solVectorPtr)[in.li_cx];
probeVars[in.admsProbeID_V_bi_ci] = (*solVectorPtr)[in.li_bi] - (*solVectorPtr)[in.li_ci];
probeVars[in.admsProbeID_V_bx_ei] = (*solVectorPtr)[in.li_bx] - (*solVectorPtr)[in.li_ei];
probeVars[in.admsProbeID_V_bi_ei] = (*solVectorPtr)[in.li_bi] - (*solVectorPtr)[in.li_ei];
probeVars[in.admsProbeID_Temp_dt_GND] = (*solVectorPtr)[in.li_dt];


    // pre-multiply any "typed" probes (i.e. those limited with "typedpnjlim")
probeVars[in.admsProbeID_V_bx_bp] *= modelStruct.modelPar_VBICtype;
probeVars[in.admsProbeID_V_bx_cx] *= modelStruct.modelPar_VBICtype;
probeVars[in.admsProbeID_V_bi_cx] *= modelStruct.modelPar_VBICtype;
probeVars[in.admsProbeID_V_bi_ci] *= modelStruct.modelPar_VBICtype;
probeVars[in.admsProbeID_V_bx_ei] *= modelStruct.modelPar_VBICtype;
probeVars[in.admsProbeID_V_bi_ei] *= modelStruct.modelPar_VBICtype;



    // Need to use processParams-like function to process the
    // initial_model block with the LOCAL copies of
    //  model vars, and local copies of model
    // params.
evaluateInitialModel(
modelStruct,
 mod.admsModTemp,in.getDeviceOptions().gmin,in);
evaluateInitialInstance(
instanceStruct,
modelStruct,
in.admsTemperature, in.adms_vt_nom,in.getDeviceOptions().gmin,in);


// Now call  the function that does the heavy lifting.

evaluateModelEquations(
probeVars,
// probe constants
in.admsProbeID_V_xf2_GND,
in.admsProbeID_V_xf1_GND,
in.admsProbeID_V_s_si,
in.admsProbeID_V_bx_si,
in.admsProbeID_V_si_bp,
in.admsProbeID_V_bp_cx,
in.admsProbeID_V_e_ei,
in.admsProbeID_V_bx_bi,
in.admsProbeID_V_b_bx,
in.admsProbeID_V_cx_ci,
in.admsProbeID_V_c_cx,
in.admsProbeID_V_b_c,
in.admsProbeID_V_b_e,
in.admsProbeID_V_bx_bp,
in.admsProbeID_V_ci_ei,
in.admsProbeID_V_bx_cx,
in.admsProbeID_V_bi_cx,
in.admsProbeID_V_bi_ci,
in.admsProbeID_V_bx_ei,
in.admsProbeID_V_bi_ei,
in.admsProbeID_Temp_dt_GND,

// node constants
in.admsNodeID_c,
in.admsNodeID_b,
in.admsNodeID_e,
in.admsNodeID_s,
in.admsNodeID_dt,
in.admsNodeID_cx,
in.admsNodeID_ci,
in.admsNodeID_bx,
in.admsNodeID_bi,
in.admsNodeID_ei,
in.admsNodeID_bp,
in.admsNodeID_si,
in.admsNodeID_xf1,
in.admsNodeID_xf2,
instanceStruct,
modelStruct,
 in.admsTemperature,
 in.adms_vt_nom,
 in.getDeviceOptions().gmin,
 d_staticContributions_dX,
 d_dynamicContributions_dX,
 in);


  // We now have the F and Q vector stuff, populate the dependencies:

    dfdp[in.admsNodeID_c+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_c];
    dqdp[in.admsNodeID_c+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_c];
    Findices[in.admsNodeID_c+inst*(14+0)] = in.li_c;
    Qindices[in.admsNodeID_c+inst*(14+0)] = in.li_c;
    dfdp[in.admsNodeID_b+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_b];
    dqdp[in.admsNodeID_b+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_b];
    Findices[in.admsNodeID_b+inst*(14+0)] = in.li_b;
    Qindices[in.admsNodeID_b+inst*(14+0)] = in.li_b;
    dfdp[in.admsNodeID_e+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_e];
    dqdp[in.admsNodeID_e+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_e];
    Findices[in.admsNodeID_e+inst*(14+0)] = in.li_e;
    Qindices[in.admsNodeID_e+inst*(14+0)] = in.li_e;
    dfdp[in.admsNodeID_s+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_s];
    dqdp[in.admsNodeID_s+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_s];
    Findices[in.admsNodeID_s+inst*(14+0)] = in.li_s;
    Qindices[in.admsNodeID_s+inst*(14+0)] = in.li_s;
    dfdp[in.admsNodeID_dt+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_dt];
    dqdp[in.admsNodeID_dt+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_dt];
    Findices[in.admsNodeID_dt+inst*(14+0)] = in.li_dt;
    Qindices[in.admsNodeID_dt+inst*(14+0)] = in.li_dt;
    dfdp[in.admsNodeID_cx+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_cx];
    dqdp[in.admsNodeID_cx+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_cx];
    Findices[in.admsNodeID_cx+inst*(14+0)] = in.li_cx;
    Qindices[in.admsNodeID_cx+inst*(14+0)] = in.li_cx;
    dfdp[in.admsNodeID_ci+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_ci];
    dqdp[in.admsNodeID_ci+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_ci];
    Findices[in.admsNodeID_ci+inst*(14+0)] = in.li_ci;
    Qindices[in.admsNodeID_ci+inst*(14+0)] = in.li_ci;
    dfdp[in.admsNodeID_bx+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_bx];
    dqdp[in.admsNodeID_bx+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_bx];
    Findices[in.admsNodeID_bx+inst*(14+0)] = in.li_bx;
    Qindices[in.admsNodeID_bx+inst*(14+0)] = in.li_bx;
    dfdp[in.admsNodeID_bi+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_bi];
    dqdp[in.admsNodeID_bi+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_bi];
    Findices[in.admsNodeID_bi+inst*(14+0)] = in.li_bi;
    Qindices[in.admsNodeID_bi+inst*(14+0)] = in.li_bi;
    dfdp[in.admsNodeID_ei+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_ei];
    dqdp[in.admsNodeID_ei+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_ei];
    Findices[in.admsNodeID_ei+inst*(14+0)] = in.li_ei;
    Qindices[in.admsNodeID_ei+inst*(14+0)] = in.li_ei;
    dfdp[in.admsNodeID_bp+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_bp];
    dqdp[in.admsNodeID_bp+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_bp];
    Findices[in.admsNodeID_bp+inst*(14+0)] = in.li_bp;
    Qindices[in.admsNodeID_bp+inst*(14+0)] = in.li_bp;
    dfdp[in.admsNodeID_si+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_si];
    dqdp[in.admsNodeID_si+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_si];
    Findices[in.admsNodeID_si+inst*(14+0)] = in.li_si;
    Qindices[in.admsNodeID_si+inst*(14+0)] = in.li_si;
    dfdp[in.admsNodeID_xf1+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_xf1];
    dqdp[in.admsNodeID_xf1+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_xf1];
    Findices[in.admsNodeID_xf1+inst*(14+0)] = in.li_xf1;
    Qindices[in.admsNodeID_xf1+inst*(14+0)] = in.li_xf1;
    dfdp[in.admsNodeID_xf2+inst*(14+0)] += d_staticContributions_dX[in.admsNodeID_xf2];
    dqdp[in.admsNodeID_xf2+inst*(14+0)] += d_dynamicContributions_dX[in.admsNodeID_xf2];
    Findices[in.admsNodeID_xf2+inst*(14+0)] = in.li_xf2;
    Qindices[in.admsNodeID_xf2+inst*(14+0)] = in.li_xf2;
}

}

#endif // Xyce_ADMS_SENSITIVITIES

} // namespace ADMSvbic13_4t
} // namespace Device
} // namespace Xyce
